Here are my notes on setting up PHP 5.1.6 on a Windows 2003 server (SBS).
- Must have “c:/php/” in system PATH environment variables (must reboot server when changing).
- In IIS under Web Service Extentions must have c:\php\php5isapi.dll Enabled.
- In IIS under the default web site (and particular web site to use PHP), configure the Application extention for .php to have path “C:\PHP\php5isapi.dll”, limit verbs to “GET,HEAD,POST”.
- Put php.ini in the c:\windows directory. The ISAPI extention didn’t find the ini file in the php directory.
- Add IUSR_Machinename to the PHP directory.
- In the php.ini file, hard code the extentions path, i.e. extension_dir = “c:/php/ext/”.
- In the php.ini file, comment out the doc_root line, i.e. ‘;doc_root = “c:\Inetpub\wwwroot” ‘.
- In the php.ini file, hard code the path to the session.save_path, i.e. ‘session.save_path = “c:/php/sessiondata” ‘.
- Add IUSR_Machinename write permission to the sessiondata and file upload folders.
- In the php.ini folder, turn display_errors = On to see error information.
- Always restart IIS when making changes to the php.ini file.
- Use this function to test PHP:
- Run PHP from a dos prompt at the PHP folder to view any missing DLL’s. This does not test the ISAPI extention pathing though.
Hope this helps someone. I found the PHP documentaion to be a bit lacking. At the time of this writing there was not an installer for PHP 5 (at least that I could find). I was also upgrading from PHP 4 (cgi) and MySQL 4 to MySQL 5.
Some of the trouble I encountered was a completely white screen (no error message at all), MySQL would not load into PHP, and “No input file specified” (doc_root).