Could not find driver PDO avec wamp

Résolu
cs_dossa Messages postés 26 Date d'inscription jeudi 17 mai 2007 Statut Membre Dernière intervention 19 novembre 2010 - 18 nov. 2010 à 14:18
cs_dossa Messages postés 26 Date d'inscription jeudi 17 mai 2007 Statut Membre Dernière intervention 19 novembre 2010 - 19 nov. 2010 à 14:31
j'ai une problème avec la connexion avec mysql et pdo
c'est la première fois que j'utilise wamp5
j'ai la classe suivante dans pdo1.php:
class PDO2 extends PDO {

private static $_instance;

public function __construct( ) {

}


public static function getInstance() {

if (!isset(self::$_instance)) {

try {

self::$_instance = new PDO(SQL_DSN, SQL_USERNAME, SQL_PASSWORD);
self::$_instance->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);





} catch (PDOException $e) {

echo $e;
}
}

return self::$_instance;
}



j'ai le message d'erreur suivant:
exception 'PDOException' with message 'could not find driver' in C:\wamp\www\comment\libs\pdo1.php:25 Stack trace: #0
C:\wamp\www\comment\libs\pdo1.php(25): PDO->__construct('mysql:dbname=co...', 'root', '')

je crois que c'est un problème de configuration de php.ini

Ma configuration PHP5
extension=php_pdo.dll
extension=php_pdo_sqlite.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll

If I want to success, i would.
If I think that I will fail, I would.
So it is my decision.

3 réponses

kohntark Messages postés 3705 Date d'inscription lundi 5 juillet 2004 Statut Membre Dernière intervention 27 avril 2012 30
18 nov. 2010 à 19:51
c'est la première fois que j'utilise wamp5

Est ce la première fois également que tu oublies le minimum de politesse ?
... tu sais, des trucs fatigants à taper du style "bonjour", "merci", etc ...
... qui prends autant de temps que ce qu'indique Le grand Jisay

Kohntark -
0
cs_dossa Messages postés 26 Date d'inscription jeudi 17 mai 2007 Statut Membre Dernière intervention 19 novembre 2010
19 nov. 2010 à 14:31
merci d'avoir le temps de me conseiller d'avoir le minimum de politesse Kohntark

If I want to success, i would.
If I think that I will fail, I would.
So it is my decision.
0
Le grand Jisay Messages postés 100 Date d'inscription mardi 8 mai 2007 Statut Membre Dernière intervention 18 février 2011 2
18 nov. 2010 à 16:01
Une petite recherche sur Google ca prend quelques secondes...
-3
Rejoignez-nous