3

I'm trying to get the mysql php pdo to work on FreeBSD 9.1.

Mysql version: 5.5.28 PHP Version: 5.4.7

Applicable Contents of Extensions.ini:

extension=pdo_dblib.so
extension=mysql.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so

PHP Info:

PDO support enabled PDO drivers dblib, sqlite

PDO Driver for FreeTDS/Sybase DB-lib enabled Flavour freetds

PDO Driver for SQLite 3.x enabled SQLite Library 3.7.14.1


So, no pdo_mysql.so being loaded, even though the file exists, its in the extensions file etc. I've even tried commenting out the pdo.so and mdo_sqlite.so just to make sure the correct extension file was being loaded and for certain... It is.

Any ideas?

Thanks!

3
  • have you looked at the error logs? there should be an error in the log if there is a problem loading an extension Commented Oct 2, 2013 at 15:14
  • Try changing the extension_dir parameter: PDO drivers no value Commented Oct 2, 2013 at 15:32
  • I took Patrick's advice and looked at the apache log in /var/log/httpd-error.log. It was complaining that pdo could not be loaded due to it being built not in release mode. (Not debug). I opted to remove debugging from my php installation and changed the configuration of php to no debug. made clean ; made deinstall ; make distclean on php5, php5-extensions and php5-pdo_mysql and remade them all. Got it to work. Commented Oct 2, 2013 at 18:20

1 Answer 1

3
  • Check which php.ini loaded and if it is the same one you are modifying. on cli, do:

php -i | head |grep -i loaded

Or in some dummy php file:

<?php
phpinfo();
?>

and then open that dummy file in the browser

  • Make sure the php mysql support package is installed.

search for it (I am using ubuntu):

apt-cache search php5*|grep mysql

Install it (mine happened to be php5-mysql and i think yours would be the same too):

sudo apt-get install php5-mysql

check again after installing it if you get what you want :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.