Connexion à la base PostgreSQL : undefined function pg_connect()
Bonjour,
J'ai installé sur un Windows XP Apache 2.2, PHP 5.2.6 et Postgré SQL 8.3.
J'ai modifié la ligne
Code:
;extension=php_pgsql.dll
en
Code:
extension=php_pgsql.dll
du fichier php.ini et redémarré le service Apache.
Apache et PHP fonctionne correctement sauf lorsque je désire me connecter à ma base Postgres par le biai de ce script :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <?php
//parametres de connection a la nouvelle base PostgresSQL phonebook
$mydb="phonebook";
$myserv="127.0.0.1";
$myuser="postgres";
$mypwd="***************";
$myport=5432;
//Connection à la base de données PostgresSQL
$connexion = 'host='.$myserv.' port='.$myport.' dbname='.$mydb.' user='.$myuser.' password='.$mypwd;
$connectPgSQL=pg_connect($connexion);
if(! $connectPgSQL){
echo "Impossible de se connecter à la base PostgresSQL $PgSQLDbName!!!";
}else{
echo "Connexion à la base PostgresSQL $PgSQLDbName réussie !";
}
?> |
j'ai cette erreur :
Citation:
Fatal error: Call to undefined function pg_connect() in C:\serveur_web\apache\htdocs\postgresqlconnection.php on line 12
et voici le fichier de log d'Apache :
Citation:
[Mon Oct 13 14:46:17 2008] [warn] pid file C:/serveur_web/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\serveur_web\\php\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Mon Oct 13 14:46:17 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Mon Oct 13 14:46:17 2008] [notice] Server built: Jan 18 2008 00:37:19
[Mon Oct 13 14:46:17 2008] [notice] Parent: Created child process 3364
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\serveur_web\\php\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Mon Oct 13 14:46:17 2008] [notice] Child 3364: Child process is running
[Mon Oct 13 14:46:17 2008] [notice] Child 3364: Acquired the start mutex.
[Mon Oct 13 14:46:17 2008] [notice] Child 3364: Starting 64 worker threads.
[Mon Oct 13 14:46:17 2008] [notice] Child 3364: Starting thread to listen on port 80.
Pourtant après avoir lu plein de post sur le sujet, je n'ai pas résolu mon problème.
Auriez vous une idée du dysfonctionnement ?
Merci d'avance,
Arnaud