Chinaunix

标题: Apache/2.2.8 (Unix) 运行PHP/5.2.6出现问题 [打印本页]

作者: geyun616    时间: 2008-05-30 20:31
标题: Apache/2.2.8 (Unix) 运行PHP/5.2.6出现问题
apache运行正常,增加php支持后运行cacti,界面直接打不开显示
无法显示网页apache的日志:
$ more access_log
192.168.66.66 - - [30/May/2008:23:37:53 +0800] "GET /cacti HTTP/1.1" 301 241
192.168.66.66 - - [30/May/2008:23:38:44 +0800] "GET /cacti HTTP/1.1" 301 241
192.168.66.66 - - [30/May/2008:23:38:50 +0800] "GET / HTTP/1.1" 200 44
192.168.66.66 - - [30/May/2008:23:38:52 +0800] "GET /cacti HTTP/1.1" 301 241

$more error_log
[Fri May 30 23:38:43 2008] [notice] Apache/2.2.8 (Unix) PHP/5.2.6 configured -- resuming normal operations
[Fri May 30 23:38:47 2008] [notice] child pid 2265 exit signal Segmentation fault (11)
[Fri May 30 23:38:49 2008] [notice] child pid 2266 exit signal Segmentation fault (11)
[Fri May 30 23:38:55 2008] [notice] child pid 2268 exit signal Segmentation fault (11)
[Fri May 30 23:38:56 2008] [notice] child pid 2267 exit signal Segmentation fault (11)

apache关于php的配置:
AddType application/x-httpd-php .php
DirectoryIndex index.php index.html index.html.var


apche安装时编译参数:
./configure --prefix=/local/apache \
--enable-so
php编译参数:
./configure --prefix=/local/php --with-apxs2=/local/apache/bin/apxs \
--with-config-file-path=/local/php  \
--enable-sockets --with-mysql=/local/mysql  \
--with-zlib-dir=/usr/include --with-gd
作者: geyun616    时间: 2008-05-30 20:37
./configure LDFLAGS="-L/usr/lib64 -L/lib64" --enable-so
更正下,apache编译时增加了64位的支持,系统是centos5,64位的
作者: geyun616    时间: 2008-05-30 20:53
刚试了个php的测试html:
<html>
<head>
<title>apache测试页面</title>
</head>
<body>
html:Hello,this is apache test page!<br><br>
php代码显示:
<?php
echo "测试php";
echo phpinfo();
?>
</body>
</html>

结果显示为:
html:Hello,this is apache test page!

php代码显示:
作者: geyun616    时间: 2008-05-31 02:15
找到原因了,原来是我没把cacti的数据库导入的缘故




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2