• PHP Help Installing PHP
  • [RESOLVED] PDO support in PHP 5.3 - Uncaught exception 'PDOException' with message 'could not fi

I keep getting the error
Uncaught exception 'PDOException' with message 'could not find driver'

Despite "extension = php_pdo_mysql.dll" in my php.ini and such it still does not seem to be loading when i open it up with phpinfo();

Configure Command

'./configure' '--prefix=/usr/local/php5' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--enable-imagick' '--enable-apc' '--enable-soap' '--enable-memcache' '--with-zlib' '--with-openssl=/usr' '--enable-mbstring' '--enable-mbregex' '--with-curl' '--enable-memcached' '--enable-ssh2'

PDO

PDO drivers	sqlite, sqlite2

Vanilla MySQL is loaded fine, just not the PDO Mysql for some reason.

    Check that php_pdo_mysql.dll
    is in the /ext/ directory. Along with php_pdo_sqlite.dll and php_pdo.dll
    It should be.
    If it is there, and still not working, then you might have to try another copy of the php_pdo_mysql.dll file.

    You should be able to find a new php_pdo_mysql.dll DLL to download somewhere.
    Otherwise download one php-5.3.x zip file package
    and unpack it
    and then copy php_pdo_mysql.dll to your /ext/ extensions directory.

      HachintoshHD/usr/include/php/ext/ only has folders in it no .dill files.

      Is this perhaps the wrong place?

        Not that it helps much, but you'll be looking for .so files since you're on a Mac/*nix OS.

          hmm i did a lot of googleing, installing, terminal typeing, magic and what not an got it working. I am wishing i recorded all the steps to get it going now.

            Write a Reply...