Hello guys. I want to share what I found last night and lookup if anyone else can reproduce this.
I have one server which HAVE TO be kept with PHP 5.2.17 because of its legacy script and old handmade websites. Its configured to run with less amount of required PHP extensions posible so it's very lightweight. Then, one of these sites needed to implement Magento, which forcefully require PDO MySQL for the queries. Everything was running fine until I decided to give Apache 2.4.6 a try. I've already deployed 2.4.6 in other servers with PHP 5.4 and everything worked smoothly. But not under PHP 5.2.17. This server run CentOS 6.4 64bits. So I decided to compile another server with CentOS 5.9 x86, PHP 5.2.17 and Apache 2.4.6 and guess what: PDO is not loading neither.
The extension_dir in both servers is:
/usr/local/lib/php/extensions/no-debug-zts-20060613
And the extensions are physically present and being called from PHP:
xcache.so, pdo.so, pdo_sqlite.so, sqlite.so, pdo_mysql.so
When you run a phpinfo() you can see
But if you scroll down, those highlighted extensions won't be shown. And in fact, are not being loaded.
BTW, I can confirm those extensions work well in other servers with these configs:
PHP 5.4.19 + Apache 2.4.6
PHP 5.4.19 + Apache 2.2.25
PHP 5.2.17 + Apache 2.2.25
The problem seems to be when you mix PHP 5.2 + Apache 2.4.
Can anybody tell if there is any known incompatibility? No workaround available? Should I stick to Apache 2.2 if PHP 5.2 is a mission critical factor?
I have opened a ticket (4330691) but I wanted to share this with the community too since I don't find info in other forums.
Thank you
I have one server which HAVE TO be kept with PHP 5.2.17 because of its legacy script and old handmade websites. Its configured to run with less amount of required PHP extensions posible so it's very lightweight. Then, one of these sites needed to implement Magento, which forcefully require PDO MySQL for the queries. Everything was running fine until I decided to give Apache 2.4.6 a try. I've already deployed 2.4.6 in other servers with PHP 5.4 and everything worked smoothly. But not under PHP 5.2.17. This server run CentOS 6.4 64bits. So I decided to compile another server with CentOS 5.9 x86, PHP 5.2.17 and Apache 2.4.6 and guess what: PDO is not loading neither.
The extension_dir in both servers is:
/usr/local/lib/php/extensions/no-debug-zts-20060613
And the extensions are physically present and being called from PHP:
xcache.so, pdo.so, pdo_sqlite.so, sqlite.so, pdo_mysql.so
When you run a phpinfo() you can see
Code:
Configure Command:
'./configure' '--enable-bcmath' '--enable-exif' '--enable-fastcgi' '--enable-force-cgi-redirect' '--enable-ftp'
'--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' [B][COLOR="#FF0000"]'--enable-pdo=shared'[/COLOR][/B]
'--enable-sockets' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr' '--with-bz2' '--with-curl=/opt/curlssl/'
'--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext'
'--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos'
'--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/'
'--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config'
'--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' [B][COLOR="#FF0000"]'--with-pdo-mysql=shared'
'--with-pdo-sqlite=shared'[/COLOR][/B] '--with-png-dir=/usr' [B][COLOR="#FF0000"]'--with-sqlite=shared'[/COLOR][/B] '--with-ttf' '--with-xpm-dir=/usr'
'--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
BTW, I can confirm those extensions work well in other servers with these configs:
PHP 5.4.19 + Apache 2.4.6
PHP 5.4.19 + Apache 2.2.25
PHP 5.2.17 + Apache 2.2.25
The problem seems to be when you mix PHP 5.2 + Apache 2.4.
Can anybody tell if there is any known incompatibility? No workaround available? Should I stick to Apache 2.2 if PHP 5.2 is a mission critical factor?
I have opened a ticket (4330691) but I wanted to share this with the community too since I don't find info in other forums.
Thank you
Last edited: