Home  >  Article  >  Backend Development  >  What should I do if apache cannot load the php configuration?

What should I do if apache cannot load the php configuration?

藏色散人
藏色散人Original
2020-08-31 09:43:082725browse

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.

What should I do if apache cannot load the php configuration?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn