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

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

藏色散人
Release: 2023-03-05 13:56:01
Original
2824 people have browsed it

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
Copy after login

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
Copy after login
Copy after login

Modify to:

SELINUX=disabled
Copy after login

Then confirm the same content in /etc/sysconfig/selinux

SELINUX=enforcing
Copy after login
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template