PHP Installation
Setting up PHP as Fast CGI (FCGI) under Apache
Submitted by chris on November 29, 2006 - 04:22. Apache modules (PHP...) | PHP Install1) Download the Apache mod_fcgi module: http://fastcgi.coremail.cn/
2) Configuration in your Apache httpd.conf:
a) LoadModule fcgid_module modules/mod_fcgid.so
b.1) <Directory "C:/Apache2/htdocs/php/">
SetHandler fcgid-script
Options execCGI
Running Apache + PHP + Accelerators under Windows 2003
Submitted by chris on September 19, 2006 - 20:54. Apache Install | Php Accelerators | Apache Bugs or Errors | PHP Bugs or Errors | PHP InstallI have been getting some instability running Apache with PHP + Accelerators under Windows 2003. I will log my finds in this article. Visit regularly for updates. I ended up running 7 Apaches on a Windows 2003 Server to test all different kinds of configurations. Recently because it was becoming complex, I started logging my finds. This page is probably for the hardcore debugging type...
Mitigating factors:
- Most crash seem to happen because of load (with very low traffic you might
never experience problems).
- My PHP applications are very demanding. Especially Gallery2 which relies on
external libraries for processing images. Again other PHP applications might not
experience these problems.
-If you have issues with IIS, these finding might also be applicable.
PHP Install
Submitted by chris on January 20, 2006 - 18:14. PHP Install1) Download PHP: http://www.php.net/downloads.php
(for more control over the install use the zip version)
Daily PHP snapshot can be found here: http://snaps.php.net/
2) Install following instructions provided by Php.net (see install.txt and/or http://us2.php.net/manual/en/install.windows.php).
Basically, upload the PHP folder to your server (make sure the web user has
read access/permissions to the appropriate files), also need "write permissions" on
some temp folders.
3) Customize the php configuration file (php.ini) for
your setup (Apache or IIS).
It seems that PHP will try to load a specific .ini file before
calling the default php.ini. It will looks for these files in a series of
folders (local folder of the calling .exe then the directories in your path).
php-apache2handler.ini is the first attempt for php5apache2.dll php4apache2.dll
php-isapi.ini is the first attempt for php5isapi.dll
php-cgi-fcgi.ini is the first attempt for php-cgi.exe
For more information about phph.ini see:
Php.ini common directives
Install PHP in CGI mode on Apache 2.x
Submitted by chris on November 17, 2006 - 19:42. Apache modules (PHP...) | PHP InstallRunning PHP in CGI mode on Apache 2.x
I was running PHP as a module under Apache and decided to try the cgi mode.
The instruction all over the web are pretty simple.
Add the following to your httpd.conf:
ScriptAlias /php52/ "E:/A22/php520/" SetEnv PHPRC "E:/A22/php520/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php52/php-cgi.exe"
The SetEnv line is useful to indicate were to look for your php.ini first.
IIS: Install PHP connector
Submitted by chris on February 16, 2006 - 22:25. IIS Configuration | PHP InstallI will review this later. But it's probably nearly good to go.
As a general note, remember IUSR_WebUser needs read permission on any files required to execute PHP (PHP connector DLL and/or EXE plus depend DLLs and the extensions), and read/write permissions to the session & upload folders.
These are defined in the php.ini, see: Php.ini common directives
Once you have PHP nicely installed, see: PHP Install
You need to add the connector to IIS.
It's pretty well documented here: http://us2.php.net/manual/en/install.windows.php
Apache: PHP Quick Shift Install
Submitted by chris on February 16, 2006 - 23:05. Apache modules (PHP...) | PHP InstallIn order to quickly shift between PHP versions here is my setup.
1) In your "bin" folder create a phpXXX folder (with XXX being the PHP version).
Example: E:\apache2\bin\php442
2) Copy the following 17 files, from your PHP version, to your phpXXX folder:
expat.dll

