The PDO extension problem

For programming and general questions on Zend Framework
Post Reply
basskeeper
Posts: 1
Joined: Fri May 01, 2009 8:06 pm

The PDO extension problem

Post by basskeeper » Fri May 01, 2009 8:33 pm

sorry for my english, but...

description of my problem:
after programming my webapp (ZF, MySQL) on my local webserver, i tried to run this application on my webhosting's server, but get this exception message:

Code: Select all

Fatal error:  Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in /home/st/_include/Zend/Db/Adapter/Pdo/Abstract.php:107
Stack trace:
#0 /home/st/_include/Zend/Db/Adapter/Abstract.php(417): Zend_Db_Adapter_Pdo_Abstract->_connect()
....
phpinfo() return this:

Code: Select all

 '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared'
i.e. pdo extension is installed?!

any suggestions to solve this problem?

cezmunsta
Posts: 60
Joined: Wed Apr 15, 2009 12:41 pm

Re: The PDO extension problem

Post by cezmunsta » Sun May 03, 2009 5:37 pm

basskeeper wrote:

Code: Select all

Fatal error:  Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in /home/st/_include/Zend/Db/Adapter/Pdo/Abstract.php:107
Stack trace:
#0 /home/st/_include/Zend/Db/Adapter/Abstract.php(417): Zend_Db_Adapter_Pdo_Abstract->_connect()
....
This implies that the extension isn't loaded.

Try using the extension_loaded() function to see if the necessary extensions are actually loaded. You will need both of the following extensions: pdo, pdo_mysql

e.g.

Code: Select all

<?php
if (extension_loaded('pdo') and extension_loaded('pdo_mysql')) {
    print "Success";
    exit();
}

print "Failed";

----
C

Post Reply