Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Friday, July 31, 2009

Nginx + PHP-FPM : $_SERVER[PHP_SELF] returning itself twice

Writing this down here in case anyone else encounters the same.

I got the $_SERVER[PHP_SELF] returning itself twice (eg. /123.php/123.php instead of /123.php as it should be) with my Nginx and PHP-FPM server. (Nginx 0.7.61, PHP 5.3.0)

Seems that the issue lies with the fastcgi configuration that I used. Make sure that this is not set.

# fastcgi_param PATH_INFO $fastcgi_script_name; #do not use, causes php_self to screw up

Saturday, July 26, 2008

GZip testing

A nifty online test tool for GZIP compression testing, along with some sample codes and methods to enable GZIP compression for your site/pages. ;)

http://www.gidnetwork.com/tools/gzip-test.php
http://www.desilva.biz/php/zlib.html

-------------------------------------

On Apache, if zlib is installed, we can use just a simple code snippet to enable GZIP compression:



Really simple right?