After installing PHPSELinux protection in RedHatLinux5 and restarting apache in the last step, the following error is reported: httpd: Syntaxerroronline53of/usr/local/apache/conf/httpd. conf: Cannotload/usr/local/apache/modules/libphp5.sow.server:/usr/local/apa
In RedHat Linux 5, install PHP SELinux protection and restart apache in the last step. The following error is reported:
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
Cause: There is a SELinux protection mode in Linux.
Solution:
1. Method for disabling SELINUX:
Vi/etc/selinux/config change SELINUX = enforcing to SELINUX = disabled and restart
This method may cause risks to the server.
2. Do not disable 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