I am trying to load Zend Optimizer into my self-compiled php.
Here is how i compile my php:
wget http://museum.php.net/php5/php-5.2.6.tar.gz
tar xvfz php-5.2.6.tar.gz
cd php-5.2.6
./configure --prefix=/usr/local/php --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php5/apache2 --with-config-file-scan-dir=/etc/php5/apache2/conf.d
make install
However, the zend_extension directive in php.ini is getting completely ignored. If I use a non-existent path i still don't even get a error message.
When using a pre-compiled php library everything is working fine.
In php.ini I also set
error_reporting = E_ALL & ~E_NOTICE
display_startup_errors = On
log_errors = On
error_log = /var/log/php_errors.log
error_log = /var/log/php_errors.log is only getting written when a error in a php-file occurs.
In apache.conf i set
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel debug
I also tried compiling with --disable-maintainer-zts --disable-safe-mode
which was mentioned on another website. I choose php-5.2.6 because it is the version of the (working) pre-compiled php, but i also tried php-version 5.2.16.
Best Answer
The Solution:
According to the Zend Optimizer user guide
The configure options --disable-zts and --disable-maintainer-zts (which should turn of Thread Safety mode) do NOT exist in PHP 5.2.x
You can control the Thread-Safety mode by doing the following:
The behavior described above does also apply to debian. So removing apache-tread-dev and installing apache2-prefork-dev did the deal!