PHP on MS IIS 6
Overview:
Setting up ISAPI version of PHP on IIS6 running on Windows 2003 Server. I had problems using the cgi based exe version of php because IIS will not store cookies if a header redirect is also sent in the header. The solution was to use the ISAPI version of PHP.
Installation:
Download the zip version of the PHP windows binaries from php.net. This includes the ISAPI version of PHP. Follow these instructions to setup PHP on IIS6, however I found I had to put the SAPI dll files in the php root directory (c:\php) rather than in the "sapi" folder. Also read the install.txt file and make sure you have setup php.ini correctly, remember the cgi.force_redirect setting. Lastly set permissions for read, folder listing and execute on c:\php for IUSR_YourMachineName.
Notices:
Remember to turn notices off if you do not explicitly declare variables. You can do this by editing the php.ini file (normally in c:\windows\). Use this line to show all errors but not notices: error_reporting = E_ALL & ~E_NOTICE
PHP Good Programming tips:
Use variables such as $_SERVER['PHP_SELF'] and turn register_globals off rather than, for example, using $PHP_SELF with register_globals on. By default on a new install register_globals is set to off.
|