Dear Wiki user, You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.
The "PHPOnWindows" page has been changed by RichBowen. http://wiki.apache.org/httpd/PHPOnWindows?action=diff&rev1=13&rev2=14 -------------------------------------------------- Note: You should read the manual installation steps first! Note: Apache 2.2.x Support Users of Apache 2.2.x may use the documentation below except the appropriate DLL file is named php5apache2_2.dll and it only exists as of PHP 5.2.0. See also » http://snaps.php.net/ - Warning - We do not recommend using a threaded MPM in production with Apache 2. Use the prefork MPM instead, or use Apache 1. For information on why, read the related FAQ entry on using Apache2 with a threaded MPM You are highly encouraged to take a look at the » Apache Documentation to get a basic understanding of the Apache 2.0.x Server. Also consider to read the » Windows specific notes for Apache 2.0.x before reading on here. @@ -36, +34 @@ You need to insert these three lines to your Apache httpd.conf configuration file to set up the CGI binary: Example #1 PHP and Apache 2.0 as CGI + + {{{ ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php @@ -44, +44 @@ # For PHP 5 Action application/x-httpd-php "/php/php-cgi.exe" + }}} + Warning + A server deployed in CGI mode is open to several possible vulnerabilities. Please read our CGI security section to learn how to defend yourself from such attacks. Installing as an Apache module You need to insert these two lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0: + Example #2 PHP and Apache 2.0 as Module + + {{{ # For PHP 4 do something like this: LoadModule php4_module "c:/php/php4apache2.dll" # Don't forget to copy the php4apache2.dll file from the sapi directory! @@ -63, +69 @@ # configure the path to php.ini PHPIniDir "C:/php" + }}} + Note: Remember to substitute your actual path to PHP for the c:/php/ in the above examples. Take care to use either php4apache2.dll or php5apache2.dll in your LoadModule directive and not php4apache.dll or php5apache.dll as the latter ones are designed to run with Apache 1.3.x. Note: If you want to use content negotiation, read related FAQ. Warning Don't mix up your installation with DLL files from different PHP versions. You have the only choice to use the DLL's and extensions that ship with your downloaded PHP version. - - == From here down is some contributed documentation. What's above is pasted from the official PHP docs ==
