PHP configuration Reference

PHP configuration Control session length

Use the following to set the necessary ini values that allow you to control time before php sessions are garbage collected

PHP configuration Turn on error reporting - override ini settings

To dynamically turn on error reporting inside a php script, even if it is disabled in the php.ini file you can use the following functions.

PHP configuration Quick manual install of PHP on windows IIS 6

  1. Download binaries and extract to C:\php (http://www.php.net/downloads.php)
  2. To make php4ts.dll / php5ts.dll available add your PHP directory, C:\php to the PATH. Read more about how to add your PHP directory to PATH in the corresponding FAQ entry (and then don't forget to restart the computer - logoff isn't enough).
  3. Rename php.ini-recommended to php.ini and copy to location where php can reach it - http://php.net/manual/en/configuration.file.php
  4. Edit php.ini :

    extension_dir = C:\php\ext

    and uncomment the extensions you need - for instance

    extension=php_gd2.dll

    session.save_path = "2;C:\tmp"


  5. The IIS user needs permission to read various files and directories, such as c:\php, php.ini, docroot, and the session tmp directory.
  6. Open IIS manager - rightclick & open the properties of your website. Under ISAPI Filters, add a new ISAPI filter. Use PHP as the filter name, and supply a path to the php4isapi.dll / php5isapi.dll.
  7. Under 'Home Directory' change the Execute Permissions to 'Scripts only'
  8. Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI DLL. An example PHP 5 value is: C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now, click OK a few times.
  9. Stop IIS completely (NET STOP iisadmin)
  10. Start IIS again (NET START w3svc)
  11. With IIS 6 (2003 Server), open up the IIS Manager, go to Web Service Extensions, choose "Add a new Web service extension", enter in a name such as PHP, choose the Add button and for the value browse to either the ISAPI file (php4isapi.dll or
[x]