HostOnNet Blog

libphp5.so: cannot enable executable stack as shared object requires: Permission denied

Looking for Linux Server Admin or WordPress Expert? We can help.

On starting Apache, i got following error

[root@localhost apache2]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/zendserver_php.conf: Cannot load /usr/local/zend/lib/apache2/libphp5.so into server: /usr/local/zend/lib/apache2/libphp5.so: cannot enable executable stack as shared object requires: Permission denied
                                                           [FAILED]
[root@localhost apache2]#

This is because SELinux. You need to disable it by editing /etc/selinux/config

vi /etc/selinux/config

Find

SELINUX=enforcing

Replace with

SELINUX=disabled

Restart server.

You can disable selinux run time with command “setenforce 0”, this will be lost on reboot, so you need to edit /etc/selinux/config for disabling permanently.

[root@localhost apache2]# setenforce 0
[root@localhost apache2]# service httpd start
Starting httpd:                                            [  OK  ]
[root@localhost apache2]#

Posted in Apache

3 Responses to libphp5.so: cannot enable executable stack as shared object requires: Permission denied

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.