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

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]#
This entry was posted in Apache and tagged , , , . Bookmark the permalink.

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

  1. Raffael says:

    It would be better if selinux is running. In order to solve the problem for real you should follow these steps:
    http://www.crypt.gen.nz/selinux/faq.html#CP.19

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>