- 论坛徽章:
- 0
|
大家好 ,Linux AS4上安装的PHP怎么用不起来??
环境:Linux AS4 Apache和php.mysql采用系统自带默认安装
我看了一下apache的默认配置(httpd.conf):
Include conf.d/*.conf
***********
[root@webnew httpd]# cd conf.d
[root@webnew conf.d]# ls
auth_mysql.conf manual.conf perl.conf php.conf python.conf README ssl.conf webalizer.conf welcome.conf.old
[root@webnew conf.d]# more php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
[root@webnew conf.d]#
可以看到php.conf配置
***********************
/etc/php.ini主要如下:
; Enable the PHP scripting language engine under Apache.
engine = On
doc_root =/var/www/cgi-bin
***************
写了一个测试的1.php
如下:
[root@webnew cgi-bin]# more 1.php
<?php
phpinfo();
?>
结果访问后显示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
看一下log:
[Mon Aug 06 13:31:36 2007] [error] [client 51.185.3.7] (Exec format error: exec of '/var/www/cgi-bin/1.php' failed
[Mon Aug 06 13:31:36 2007] [error] [51.185.3.7] Premature end of script headers: 1.php
*****************
请教一下这个是怎么回事情???
怎么解决??
谢谢
谢谢 |
|