How to solve the problem that apache cannot load the php configuration: first open "config"; then modify the content to "SELINUX=disabled"; finally restart the system so that Apache starts normally.
Recommended: "PHP Video Tutorial"
Apache cannot load the PHP module problem
#apachectl restart Syntax error on line 232 of /app/apache2.0.55/conf/httpd.conf: Cannot load /app/apache2.0.55/modules/libphp4.so into server: /app/apache2.0.55/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied
The package libphp4.so cannot always be loaded. After searching, it turns out that it is due to SELinux. Then turn off SELinux:
vi /etc/selinux/config and find this paragraph:
SELINUX=enforcing
Modify to:
SELINUX=disabled
Then confirm the same content in /etc/sysconfig/selinux
SELINUX=enforcing
Change to SELINUX=disabled (if it is already disabled, there is no need to change it)
Finally restart the system, Apache starts normally!
If you encounter a similar prompt again:
cannot restore segment prot after reloc: Permission denied
It should be a problem with SELinux, you can consider turning it off.
The above is the detailed content of What should I do if apache cannot load the php configuration?. For more information, please follow other related articles on the PHP Chinese website!