Solution to Cannot load /usr/local/apache/modules/libphp5.so

  

The last step to restart apache reported the following error: 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 Solution: The reason is that Linux has a SELinux protection Caused by the pattern. 1 Close the SELINUX method: vi /etc/selinux/config Change SELINUX=enforcing to SELINUX=disabled Need to restart

2Do not close 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

Copyright © Windows knowledge All Rights Reserved