Uncaught exception 'PDOException' with message 'could not find driver'

Hi All I need Your Help

I got error

Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /home/rails/public_html/newidenty/server.php:12 Stack trace: 
#0 /home/rails/public_html/newidenty/server.php(12): PDO->__construct('mysql:dbname=ra...', 'rails_identy', 'rails_identy') 
#1 /home/rails/public_html/newidenty/registration.php(2): include('/home/rails/pub...') 
#2 {main} thrown in /home/rails/public_html/newidenty/server.php on line 12.

I am using Have all Infromation of PHP Version and also showing PDO Library.

My Hosting Provide saying they install PDO in it but Getting Problem

My Code is

    $dsn      = 'mysql:dbname=*****;host=localhost';
    $username = '*****';
    $password = '*****';

    // error reporting (this is a demo, after all!)

    // Autoloading (composer is preferred, but for this example let's just do this)
    $PDO = new PDO("mysql:dbname=*****;host=localhost",$username,$password);
    // $dsn is the Data Source Name for your database, for exmaple "mysql:dbname=my_oauth2_db;host=localhost"
    $storage = new OAuth2\Storage\Pdo(array('dsn' => $dsn, 'username' => $username, 'password' => $password));

    // Pass a storage object or array of storage objects to the OAuth2 server class
    $server = new OAuth2\Server($storage);

    // Add the "Client Credentials" grant type (it is the simplest of the grant types)
    $server->addGrantType(new OAuth2\GrantType\ClientCredentials($storage));

    // Add the "Authorization Code" grant type (this is where the oauth magic happens)
    $server->addGrantType(new OAuth2\GrantType\AuthorizationCode($storage));


Please help..


According to the phpinfo() you showed, only the PDO Sqlite driver is installed. You need to tell the hosting provider to install the PDO MySQL driver.

Need Your Help

Asp.Net Session is null in ashx file

asp.net session httphandler

I am trying to access the Session variable in Asp.Net ashx handler as shown below.

Objective-C: `continue` in collection enumeration block?

objective-c ios nsarray objective-c-blocks

If I have an NSArray and I use enumerateUsingBlock to loop through elements in the array, but in some cases I need to skip the loop body and go to next element, is there any continue equivalent in ...