Thursday, December 1, 2016

Turn on SSL certificate on localhost

Sunday, November 6, 2016

Free PHP Projects for Students

Thursday, October 27, 2016

Measuring PHP Page Load Time

$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;


$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo 'Page generated in '.$total_time.' seconds.';



Ref: http://www.coding101.in/2016/10/measuring-php-page-load-time.html

Wednesday, October 5, 2016

MySQL Workbench loosing the connection when it is idle in ubuntu

The TCP keepalive on the Azure load balancer is 240 seconds by default, which can cause it to silently drop connections if the TCP keepalive on your Azure systems is greater than this value. You should set tcp_keepalive_time to 120 to ameliorate this problem.

OS : Ubuntu 14.04 hosted on windows azure virtual machine.

1. To check the tcp_keepalive_time
#cat /proc/sys/net/ipv4/tcp_keepalive_time
7200 (by default 2 hours)

2.set value from 2 hours to 120 seconds.
#sudo sysctl -w net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_keepalive_time = 120

3. recheck the value after changing.
#cat /proc/sys/net/ipv4/tcp_keepalive_time
120

4.Set the value in the sysctl file to remain the value even after reboot.
#vi /etc/sysctl.conf
Press i (To insert into file)
net.ipv4.tcp_keepalive_time = 120(Add this line at the bottom of the file)
:wq(Save and exit)

Now your connection will alive.

Tuesday, May 31, 2016

PHP Programming tricks

http://www.gauravkgupta.com/development/20-tips-need-learn-become-better-php-programmer/

Thursday, May 26, 2016

Tuesday, May 3, 2016

Easy Deployment of PHP Applications with Deployer

Social Logins in PHP with HybridAuth

Mastering Composer – Tips and Tricks

Writing PHP Git Hooks with Static Review

http://www.sitepoint.com/writing-php-git-hooks-with-static-review/

More Tips for Defensive Programming in PHP

Clean Code Architecture and Test Driven Development in PHP

Transducers in PHP Made Easy