PHP

PHP/IIS7 – IIS to return a 502 Bad Gateway

Posted by on January 16, 2010 at 7:19 pm

php-cgi.exe does work on IIS7. You need to modify PHP.INI to have the line: cgi.force_redirect = 0 If you do not do this modification, PHP-CGI.EXE outputs a security warning response without proper response headers, which causes IIS to return a 502 Bad Gateway. Strangely, running PHP-CGI.EXE from the commandline does not generate this error – [...]

PHP compression using gzip

Posted by on January 10, 2010 at 1:46 pm

The best way to compress PHP files is to use auto_prepend_file Add the filling code to a file called gzip.php <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start(); ?> Then update your php.ini files as follows auto_prepend_file= /path/to/gzip.php you can also use a htaccess file if your server permits php_value auto_prepend_file gzip.php Testing the compression or [...]

PHP – File too large to upload

Posted by on October 2, 2009 at 11:24 am

Your file size upload is controlled by two variables in php.ini upload_max_file_size and post_max_file_size

missing the mysql which is required for wordpress

Posted by on September 11, 2009 at 7:50 pm

php installation appears to be missing the mysql which is required for wordpress ====== open the php.ini file. if you do a search for extension=php_mysql.dll and un comment it ie delete the ; at the beginning of the line then search further up in the ini file for extension_dir=”./” and replace ./ with c:\php\ext (assuming [...]

PHP has encountered an Access Violation

Posted by on September 11, 2009 at 7:49 pm

There seems to be a bug when using PHP version 5.2.10 on windows 2003. Using the isapi module We have encountered the following error “PHP has encountered an Access Violation” After downgrading to 5.2.6 the error has cleared.