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
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';
}
?>
@dhirajray ,I've got the same error ,change the permissions of folder(with name "uploads") and autoload.php, then figure it out.
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