ОС: CentOS5
Связка: Apache/2.2.3 + PHP 5.2.6# php -m
Failed loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission deniedНашел три вариант решения проблемы:
1) Disable SELinux by editing /etc/selinux/config and setting SELINUX=disabled' there.
2) If you want SELinux enabled, you can remove SELinux protection from httpd by using system-config-securitylevel tool
3) If you want SELinux protection on httpd, use this to enable loading Zend modules: chcon -t httpd_modules_t `find /usr/local/Zend/lib -name \*.so`Первые два работают но меня они не устраивают.
Третий способ не срабатывает.# ls -Z /usr/local/Zend/lib/*.so
-rwxr-xr-x root root system_u:object_r:httpd_modules_t /usr/local/Zend/lib/ZendExtensionManager.so
-rwxr-xr-x root root system_u:object_r:httpd_modules_t /usr/local/Zend/lib/ZendExtensionManager_TS.soКакие есть предложения?
# cat /var/log/messages | grep ZendAug 10 17:00:41 www setroubleshoot: SELinux is preventing /usr/bin/php from loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so which requires text relocation. For complete SELinux messages. run sealert -l bb012991-4c46-458f-a7be-b5ee00d43b65
# sealert -l bb012991-4c46-458f-a7be-b5ee00d43b65
Allowing Access
If you trust /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so
to run correctly, you can change the file context to textrel_shlib_t. "chcon
-t textrel_shlib_t
/usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so"The following command will allow this access:
chcon -t textrel_shlib_t /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so# chcon -t textrel_shlib_t /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so
# php -m
[Zend Modules]
Zend Extension Manager
Zend OptimizerМодуль подгрузился но в phpinfo его не видно...