note 78204 added to install.windows.apache2
| From: | packard_bell_nec at hotmail dot com | Date: | Wed, 03 Oct 2007 03:25:35 +0000 |
| Subject: | note 78204 added to install.windows.apache2 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131020@lists.php.net to get a copy of this message | ||
If you install PHP as an Apache CGI binary, you can add:
AddHandler cgi-script .php
into Apache httpd.conf, and add shebang line to every PHP scripts like:
#!php
<?php
phpinfo();
?>
. But adding shebang line has a disadvantage that if you decided to install PHP as an Apache module
afterwards, then the shebang line WILL appear in the web page.
In fact, you do NOT need to add shebang line to every PHP script even if you install PHP as an
Apache CGI binary, because you can add:
ScriptInterpreterSource Registry-Strict
into Apache httpd.conf, and make the registry file and merge it like:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.php\Shell\ExecCGI\Command]
@="\"C:\\Program Files\\PHP\\php-cgi.exe\""
. Then you will NOT need to change the PHP scripts which do not contain shebang line.
----
Server IP: 69.147.83.197
Probable Submitter: 123.202.148.251
----
Manual Page -- http://www.php.net/manual/en/install.windows.apache2.php
Edit -- https://master.php.net/note/edit/78204
Del: integrated -- https://master.php.net/note/delete/78204/integrated
Del: useless -- https://master.php.net/note/delete/78204/useless
Del: bad code -- https://master.php.net/note/delete/78204/bad+code
Del: spam -- https://master.php.net/note/delete/78204/spam
Del: non-english -- https://master.php.net/note/delete/78204/non-english
Del: in docs -- https://master.php.net/note/delete/78204/in+docs
Del: other reasons-- https://master.php.net/note/delete/78204
Reject -- https://master.php.net/note/reject/78204
Search -- https://master.php.net/manage/user-notes.php