Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dhirajray opened this issue Jun 4, 2015 · 3 comments
Open
Labels

Comments

@dhirajray
Copy link

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

@James-Dunn
Copy link
Contributor

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';
}

?>

@JoeFirmament
Copy link

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

@ewagnerdesign
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants