Installation of Zend optimizer gives errors in logfiles, and phpinfo only shows the Zend engine to be installed.

If the situation in the subject applies to you, then you most likely have an selinux problem!

You can verify this by checking /var/log/messages for output like:
avc: denied { unlink } for pid=29435 comm="httpd"


You should be able to get the appropriate rules from your error logs by using the following command:

~# audit2allow -i /var/log/messages -l


Chances are, if you are getting selinux errors, then your sources are not installed:

~# up2date selinux-policy-targeted-sources


Now, we must add the rules we need to allow apache to operate properly.

~# cd /etc/selinux/targeted/src/policy
~# vi domains/misc/local.te

Add your rules to local.te, and now we must save the file and rebuild our policy

~# make reload


As Apache may be able to perform additional operations with its new permissions, it is always a good idea to restart apache, and see if any new selinux deny messages are present. The audit2allow command listed above will only report rule changes that need to be made since the last policy reload.


The following list of permissions should allow apache to do pretty much anything you want:

allow httpd_t file_t:dir { getattr search };
allow httpd_t file_t:file write;
allow httpd_t unconfined_t:fifo_file read;
allow httpd_t usr_t:file execute;
allow httpd_t default_t:dir write;
allow httpd_t default_t:dir add_name;
allow httpd_t default_t:file create;
allow httpd_t default_t:dir remove_name;
allow httpd_t default_t:file getattr;
allow httpd_t default_t:file unlink;
allow httpd_t file_t:dir write;
allow httpd_t file_t:dir add_name;
allow httpd_t file_t:file create;
allow httpd_t file_t:dir remove_name;
allow httpd_t file_t:file getattr;
allow httpd_t file_t:file unlink;