I attempted to install the PDO MySQL driver onto a server with Solaris using the following commands:

$ pecl download pdo_mysql
$ tar xzf PDO_MYSQL-1.0.2.tgz
$ cd PDO_MYSQL-1.0.2
$ phpize
$ ./configure --with-pdo-mysql=/usr/local/mysql
$ make
$ make install

Whenever I restart apache using "./apachectl restart" it fails to start (I'm only assuming since it won't load any of the websites hosted on it - I receive no error messages when running the preceding command).

My extension dir is "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/" and the following line is in my php.ini file "extension=pdo_mysql.so". There is indeed a new pdo_mysql.so file generated in the extension_dir. When I comment out "extension=pdo_mysql.so", Apache starts successfully.

If I try the command pecl install pdo_mysql I get pecl/pdo_mysql is already installed and is the same as the released version 1.0.2.

What could have went wrong with my installation and where can I find error messages as to why Apache isn't starting?

UPDATE: I found my error log and found the following message:

ld.so.1: php: fatal: relocation error: file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so: symbol php_pdo_declare_long_constant: referenced symbol not found

Also, is it possibly that it's an issue that I have to have "pdo_mysql.so" in my php.ini file, but not pdo.so? PDO (not the PDO MySQL driver) is not being loaded as an extension with php.ini, but already seems to be included in my PHP installation.

Any ideas?

  • 2
    Did you check the apache error_log file ? – radius Jun 19 '09 at 18:22

Apparently this was a known bug in the version of PHP I was using: http://pecl.php.net/bugs/bug.php?id=12141

We ended up resolving this by compiling a new version of PHP without PDO compiled in and using PECL to install the PDO drivers.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy