httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf
2009-06-13 22:35

今天装了一个amp环境,系统环境为AS5;装完php后启动apache时报错:
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
google了一下基本问题就是SELinux保护模式引起的
找到一个哥们的blog 是这样写的:
1关闭SELINUX的方法:
vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disabled 需要重启
 
2不关闭SELINUX的方法:
# setenforce 0
# chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /usr/local/apache/modules/libphp5.so
# service httpd restart
# setenforce 1
实验了一下确实管用apapche启动正常,php正常显示