免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2375 | 回复: 2
打印 上一主题 下一主题

大家好 ,Linux AS4上安装的PHP怎么用不起来??谢谢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-06 13:32 |只看该作者 |倒序浏览
大家好 ,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

*****************
请教一下这个是怎么回事情???
怎么解决??
谢谢

谢谢

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2007-08-06 13:41 |只看该作者
放到/var/www再看看。

论坛徽章:
0
3 [报告]
发表于 2007-08-06 16:14 |只看该作者
谢谢
还真神了
真是这个问题
我却从来没想过,没试过
脸红
原来想的怎么也应该在cgi-bin下
下面我自己摸索吧
谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP