Bonjour, tout le monde

J'aimerais me connecter avec une base de données access qui se trouve sur un serveur Windows 2000 via PHP qui tourne sous Linux.

Côte PHP, j'ai installé le librairie libmdbodbc.so

Côté windows; j'ai fais la configuration suivante :
* Open the Administrative Tools icon in your Control Panel.
* Double-click on the Data Sources (ODBC) icon inside.
* Choose the System DSN tab.
* Click on Add in the System DSN tab.
* Select the Microsoft Access Driver. Click Finish.
* In the next screen, click Select to locate the database.
* Give the database a Data Source Name (DSN).
* Click OK

fichier de connexion PHP :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
	// connection à la base
	putenv("ODBCINI=/etc/odbc.ini");
	putenv("ODBCINSTINI=/etc/odbcinst.ini");
	putenv("LD_LIBRARY_PATH=/usr/local/mdbtools/lib");
	$dbms = odbc_connect("agenda", "", "") or die('Erreur de connexion ');
	$sTmpTableName = "saisie";
 
 
	$sql="SELECT * FROM $sTmpTableName";
	$rs=odbc_exec($dbms,$sql);
	if (!$rs)
	  {exit("Error in SQL");}
	echo "<table><tr>";
	echo "<th>Email</th>";
	while (odbc_fetch_row($rs))
	  {
	  $compname=odbc_result($rs,"email");
	  echo "<tr><td>$compname</td>";
	  echo "<td></td></tr>";
	  }
	odbc_close($dbms);
	echo "</table>";
?>
j'ai le message d'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
Warning: odbc_connect() [function.odbc-connect]: SQL error: Failed to fetch error message, SQL state HY000 in SQLConnect in /home/www/site/connexion_agenda_lp.php on line 5
Erreur de connexion