CosmoCMS / Cosmo

Single Page App CMS

Home Page:http://www.cosmocms.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Argument 1 passed to Cosmo::__construct() must be an instance of PDO

dhirajray opened this issue · comments

Catchable fatal error: Argument 1 passed to Cosmo::__construct() must be an instance of PDO, null given, called in D:\xampp\htdocs\cosmo\core\app\initialize.php on line 5 and defined in D:\xampp\htdocs\cosmo\core\app\Cosmo.class.php on line 14

commented

Does your configuration allow PDOs? You can create a php file like this and navigate to it:

<?

if (!defined('PDO::ATTR_DRIVER_NAME')) {
    echo 'PDO unavailable';
}
elseif (defined('PDO::ATTR_DRIVER_NAME')) {
    echo 'PDO available';
}

?>
commented

@dhirajray ,I've got the same error ,change the permissions of folder(with name "uploads") and autoload.php, then figure it out.

commented

I have the same error, PDO is available and I've changed the permissions of uploads folder and autoload.php file still getting the error. I also get an error when trying to go to install.php. The error reads:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket