LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 721|回复: 2

[请教]apache2.0.55和php5.1.2整合问题

[复制链接]
发表于 2006-5-7 20:17:06 | 显示全部楼层 |阅读模式
安装完Apache后测试,Apache好用的!
等安装完PHP后Apache就不能启动了,在shell中执行 ./apachectl restart 时出现的提示

apachectl: Configuration syntax error, will not run "restart":
httpd: Syntax error on line 205 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

安装apache
./configure --prefix=/etc/httpd \
> --enable-module=so

安装php
./configure --prefix=/usr/local/php \
--with-apxs2=/etc/httpd/bin/apxs \
--with-gd \
--with-jpeg-dir \
--with-ttf \
--with-zlib-dir \
--with-png-dir \
--with-mysql=/usr/local/mysql \
--enable-track-vars

libphp5.so权限
chmod 755 /etc/httpd/modules/libphp5.so

使用的系统是FC5
发表于 2006-5-8 17:22:03 | 显示全部楼层
FC5使用了 selinux对系统进行保护,没加标签的动态库是不能在apache里加载的
解决方法1:对目标加标签
    1,对apache编译时指定使用prefork
    2,按selinux的要求对每个目录和.so加标签
解决方法2:关selinux
可看上去你不象是启动了selinux,那就可能是你编译时没有作成prefork
再有把apache根目录设置到/etc确实(这种人)少见
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-8 22:57:03 | 显示全部楼层
.......问题己解决.......之前有人在服务器上装了apache2.2.0.......
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表