Install Zend Optimizer

cd /usr/local/src
check latest zendoptimizer
tar -zxf ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.0.1-linux-glibc21-i386
./install
If u still receiving “Zend Optimizer Not Installed” error page, then
SELinux is interfering with Apache’s attempt to access the .so file.
So do this commands
#chcon -t texrel_shlib_t  path_of_ZendOptimizer.so (/usr/local/Zend/ZendOptimizer.so)
#execstack -c path_of_ZendOptimizer.so (/usr/local/Zend/ZendOptimizer.so)
#setenforce 0
#getenforce
then restart httpd and check.
If the issue still persist,
vi /etc/selinux/config
SELINUX=disabled
then reboot the server

cd /usr/local/src

check latest zendoptimizer

wget http://www.eth0.us/files/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz

tar -zxf ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz

cd ZendOptimizer-3.0.1-linux-glibc21-i386

./install

If u still receiving “Zend Optimizer Not Installed” error page, then

SELinux is interfering with Apache’s attempt to access the .so file.

So do this commands

#chcon -t texrel_shlib_t  path_of_ZendOptimizer.so (/usr/local/Zend/ZendOptimizer.so)

#execstack -c path_of_ZendOptimizer.so (/usr/local/Zend/ZendOptimizer.so)

#setenforce 0

#getenforce

then restart httpd and check.

If the issue still persist,

vi /etc/selinux/config

SELINUX=disabled

then reboot the server

Advertisements

easy apache – Premature end of script headers error

Error : BEGIN failed–compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Utils/BackGround.pm line 12.
Compilation failed in require at (eval 18) line 3….propagated at /usr/lib/perl5/5.8.8/base.pm line 85.

Premature end of script headers: /usr/local/cpanel/whostmgr/docroot/cgi/easyapache.pl

To fix, just run:

/scripts/checkperlmodules

PHP 5 Local

As php5 compiled in the cgi mode customers cannot to use .htaccess directives like php_admin, php_value, php_flag. In phpsuexec setup (for main php) it is overridden by allowing customers place custom php.ini with the variables.

However if you build the php5 as the secondary php it will not have such ability. So how to solve it? To write very simple wrapper to pass php.ini line of the current directory if exists.

The steps to be done after php5 setup.

Moving php5 binary:

mv /usr/local/cpanel/cgi-sys/php5 /usr/local/cpanel/cgi-sys/php5.bin

Then creating wrapper file in the /usr/local/cpanel/cgi-sys/php5 with the following content:

#!/bin/bash

# This will fake the name & path and hide the /usr/local/cpanel/cgi-sys/php5 path!
export SCRIPT_NAME=$REQUEST_URI
export SCRIPT_FILENAME=$PATH_TRANSLATED
export PWD=`echo $PATH_TRANSLATED|egrep -o “(.*?/)”`

if [ -f “$PWD/php.ini” ]; then
exec /usr/local/cpanel/cgi-sys/php5.bin -c $PWD
else
exec /usr/local/cpanel/cgi-sys/php5.bin
fi

Save the file and change the permissons:

chown root:wheel /usr/local/cpanel/cgi-sys/php5*;
chmod 755 /usr/local/cpanel/cgi-sys/php5*;

We are done! By default php5 will use the global php.ini, but if the customer has the own php.ini in its folder php5 will use it instead