note 36497 added to install.apache2

From: Date: Sun, 12 Oct 2003 04:38:06 +0000
Subject: note 36497 added to install.apache2
Groups: php.notes 
Request: Send a blank email to php-notes+get-58334@lists.php.net to get a copy of this message
For PHP and Apache 2.0 on Windows, CGI (not module) flavour, here's another example of the lines you must add to Apache's httpd.conf: AddType application/x-httpd-php .php Action application/x-httpd-php "/php-exe-location/php.exe" ScriptAlias /php-exe-location/ "c:/Program Files/php-4.3.3-Win32/" These allow you to have PHP installed in "c:\Program Files" (where it belongs so it doesn't clutter up c:\). Also, for explanation purposes only, I've re-ordered the statements into the order in which Apache uses them to process an incoming request. Corresponding to the lines above, here's what happens to an incoming request for http://www.mySite.com/myPHP/foo.php: (1) the "AddType" directive means all requests ending in ".php" will be MIME type "application/x-httpd-php" (2) the "Action" directive means anything of MIME type "application/x-httpd-php" will get acted upon by something with URL (not file system path) of "/php-exe-location/php.exe" (3) the "ScriptAlias" directive means any URL with "/php-exe-location/" will get that mapped to "c:/Program Files/php-4.3.3-Win32/" in the file system and will be treated as a script. (4) "c:\Program Files\php-4.3.3-Win32\php.exe" (Apache will switch forward-slashes to back-slashes) will get executed. php.exe must then examine the original HTTP request (available via environment variables as per CGI spec) to see that it is "myPHP/foo.php" it's supposed to execute. ---- Manual Page -- http://www.php.net/manual/en/install.apache2.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36497 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36497&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36497&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58334) next »