Category: PHP

  • PHP-FPM Restart Upon Crash

    PHP-FPM service, when running as socket, seems to crash making Nginx output errors and users frustated. This is a simple fix to bypass the issue with auto restarting the php upon crash. Although it is recommended to see why the crash occurs in first place and fix that first.

    Read More

  • Nginx + PHP continious output

    Some times we requrire the page to display partial content, such as progress while the PHP is still working in background. In apache, disabling output buffering works fine, however for nginx, the following code need to be added on top of any PHP script (before output stats).

    Read More

  • PHP IP to Country Script

    This is a simple script to translate IP to country. It is usefull when you want to know where your traffic is coming from or perform specific actions to traffic from specific countries. Do take note that users using proxies or VPN can circumvent this and give a false country.

    Read More

  • First Post

    Simple beginnings.

    Read More