麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
配置APACHE + php :啥都改遍了,php页面还是连接不上, 求救!!
悬赏分:20 - 2007年08月22日

原来是FC3,httpd-2.0.52-3,php-4.3.9-3,libxml2-2.6.14-2,postgresql-7.4.6
要升级到php5。

过程:
cd php-5.2.1
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/sbin/apxs
--with-config-file-path=/usr/local/php5
--enable-ftp --with-gd --with-zlib
--with-pgsql=/usr/lib/pgsql
--with-regex=php –with-flex=/usr/bin/flex
--with-png-dir=/usr/lib/libpng
--with-jpeg-dir=/usr/lib/libjpeg
make;make install

cp php.ini-recommended /etc/php.ini
修改php.ini:

配置http.conf :
LoadModule php5_module modules/libphp5.so
phpIniDir "/usr/local/php5/etc"
DirectoryIndex index.php index.html index.html.var

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

DocumentRoot "/var/www/html"

关闭/etc/sysconfig/selinux :
SELINUX=disabled
关闭/etc/selinux :
SELINUX=disabled

修改权限:
chown –R apache.apache /var/www/html

测试文件/var/www/html/test.html:

linux FC3 hello world!

测试文件/var/www/html/php.php:
< ?php
phpinfo() ;
?>

重启linux ;重启apache ;

测试apache 页面http://localhost/test.html 成功。
测试php 页面http://localhost/php.php失败。

在启动apache后(启动时间Thu Mar 8 21:20:02 CST 2007),
error_log有内容:
[Thu Mar 08 20:18:48 2007] [notice] child pid 3487 exit signal Segmentation fault (11)
[Thu Mar 08 20:18:53 2007] [notice] child pid 3489 exit signal Segmentation fault (11)
[Thu Mar 08 20:28:56 2007] [notice] child pid 3490 exit signal Segmentation fault (11)
[Thu Mar 08 20:28:57 2007] [notice] child pid 3488 exit signal Segmentation fault (11)
[Thu Mar 08 20:28:58 2007] [notice] child pid 3483 exit signal Segmentation fault (11)
[Thu Mar 08 20:31:07 2007] [notice] child pid 3484 exit signal Segmentation fault (11)
[Thu Mar 08 20:31:08 2007] [notice] child pid 3485 exit signal Segmentation fault (11)
[Thu Mar 08 21:17:41 2007] [notice] child pid 3486 exit signal Segmentation fault (11)
[Thu Mar 08 21:19:23 2007] [notice] caught SIGTERM, shutting down
*** glibc detected *** double free or corruption: 0x000000552afe9580 ***
[Thu Mar 08 21:19:25 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Mar 08 21:19:25 2007] [notice] Digest: generating secret for digest authentication ...
[Thu Mar 08 21:19:25 2007] [notice] Digest: done
[Thu Mar 08 21:19:25 2007] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Thu Mar 08 21:19:25 2007] [notice] LDAP: SSL support unavailable
[Thu Mar 08 21:19:25 2007] [notice] mod_python: Creating 4 session mutexes based on 256 max processe
s and 0 max threads.
[Thu Mar 08 21:19:25 2007] [notice] Apache/2.0.52 (Fedora) configured -- resuming normal operations
ssl_error_log有内容:
[Thu Mar 08 21:19:25 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' doe
s NOT match server name!?
[Thu Mar 08 21:19:25 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' doe
s NOT match server name!?

php 页面失败后,
error_log有内容(时间是08 21:37):
[Thu Mar 08 21:19:25 2007] [notice] Apache/2.0.52 (Fedora) configured -- resuming normal operations
[Thu Mar 08 21:37:32 2007] [notice] child pid 3783 exit signal Segmentation fault (11)

改了两天了,能改的全改了,php就是出不来
还差哪儿啊???

提问者:东北西北   08-22 14:02
答复
这问题我也找了很久了,最后解决了。 1、修改 httpd.conf,如果有如下两行: LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so LoadModule php4_module /usr/lib64/httpd/modules/libphp4.so 就注释掉对php4_module的加载。 2、找到:/etc/httpd/conf.d/php.conf(你的环境是否在这个目录?),里边有一行: LoadModule php4_module modules/libphp4.so 将它修改为: LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so 即可。
回答者:PHP爱好者 - 瓦岗村民 01-03 15时
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
74 + 9 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM