错误信息:(9)Bad file descriptor: don't know how to spawn child process: D:/phptest/gt.php
D:/phptest/gt.php is not executable; ensure interpreted scripts have "#!" first line
(9)Bad file descriptor: don't know how to spawn child process: D:/phptest/gt.php
D:/phptest/gt.php is not executable; ensure interpreted scripts have "#!" first line
(9)Bad file descriptor: don't know how to spawn child process: D:/phptest/gt.php
CGI方式安装
在Apache httpd.conf中插入下面的语句(C:/php/替换为你php实际安装位置)
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"模块方式安装
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php# configure the path to php.ini
PHPIniDir "C:/php"
CGI用这个
AddType application/x-httpd-php .php .phtml .php3 .php4
Action application/x-httpd-php "C:/php5/php-cgi.exe"
模块用这个
LoadModule php5_module c:\php5\php5apache2.dll参考
http://dev.csdn.net/article/45/45137.shtm
去phpe看看
# "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
Options +ExecCGI
AddHandler cgi-script .cgi
</Directory>
AddType application/x-httpd-php-source .phpsAction application/x-httpd-php "C:\php5\php-cgi.exe"
ScriptAlias /php/ "d:/phptest/"
<Directory "d:/phptest/">
AllowOverride None
Options None
Order allow,deny
Allow from all
Options +ExecCGI
AddHandler cgi-script .cgi
</Directory>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php "/php/php.exe"
模块方式
LoadModule php5_module c:\php\php5apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps