I shifted the site from shared server to dedicated server but the site is not working correctly. I am getting the error as "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 ";
Result for:
if (extension_loaded('pdo') and extension_loaded('pdo_mysql')) {
print "Success";
} else {
print "Failure";
}
is also false.
------Index File------
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'prod开发者_Go百科uction'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();
Link of the site: http://voxsun.com phpinfo of site: http://voxsun.com/public/info.php
Thanks, Lalit
In the first line of your phpinfo()
we can read:
'./configure' '--disable-pdo'
Well, it's self-explanatory.
If you compiled PHP yourself, I really advise you to use your package manager to do so (aptitude, yum, etc.), it'll ease your system upgrade and avoid you to compile it hand each time you need to update PHP.
Do it only if you've very good reasons.
From the you're info.php ... Configure Command './configure' '--disable-pdo' so put it simple, php wasn't compiled with pdo in mind .
One option would be to try and load the extensions manualy in public/index.php at the start of you're script ( i don't expect it to work but it's worth giving it a try ) :
dl('pdo.so');
dl('pdo_mysql.so');
PHP: dl - Loads a PHP extension at runtime
精彩评论