ホームページ  >  記事  >  php教程  >  手工编译安装php后,重启apache时,libphp5.so: cannot restore

手工编译安装php后,重启apache时,libphp5.so: cannot restore

WBOY
WBOYオリジナル
2016-06-06 20:01:42980ブラウズ

Cannot load /www/modules/libphp5.so into server error (1/1) bigb89 : Hi, I am trying to install PHP and configure it to work with Apache. So far I have Apache 2 and MySQL 5 working just fine, but after intalling PHP I tried to restart Apac

Cannot load /www/modules/libphp5.so into server error

(1/1)

bigb89: Hi, I am trying to install PHP and configure it to work with Apache. So far I have Apache 2 and MySQL 5 working just fine, but after intalling PHP I tried to restart Apache and I get the following error: Cannot load /www/modules/libphp5.so into server: /www/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied. What's causing this error is the following line on my httpd.conf file: LoadModule php5_module        modules/libphp5.so. Could anyone explain to me what's causing this error and how can I fix it? Thanks in advance!

rlee923: Hi, I assume you are using one of those linux with Selinux enabled. The problem is caused by the security system - selinux, blocking it's access to libph5.so. chcon -t texrel_shlib_t /usr/local/apache/modules/libphp5.so This is the magic line of the code, change the path so it points to the directory where you've installed apache2 if necessary.

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。