我有一台在windows下运行的开发计算机。
对于一个项目,我必须创建一个必须连接到 Ingres 数据库服务器的 php 网站。
所以我安装了 wamp,我安装了 ingres(服务器和客户端,在我的本地机器上)。
我在文件夹中添加了在他们的站点(php_ingres.dll
)上找到的库C:\wamp\bin\php\php5.3.5\ext
,并在配置文件中添加了一行“ extension=php_ingres.dll
”。
我关闭 wamp 并重新启动它,然后重新启动服务器,我现在在 wamp 菜单中看到一个复选标记,表明 php_ingres 现在已激活。但是当我进入服务器的欢迎页面时,我没有看到这个扩展已加载。如果我进入 php 信息页面,我在配置命令中看不到任何 Ingres 条目。
我只是找不到任何post/tutorial/...
指示如何执行此操作的信息,因此将不胜感激!
谢谢!
编辑:我做了一个小测试,看看我是否可以连接到 Ingres 数据库:
<?php
$link = ingres_connect("localhost", "demodbtest", "demodbtest") or die("Connexion impossible");
echo "Connexion réussie";
$result = ingres_query($link,"select * from airline");
while ($row = ingres_fetch_array($result)) {
echo $row["al_iatacode"]; // utilisation du tableau associatif
echo $row["al_name"];
echo $row["al_ccode"]; // utilisation du tableau à indices numériques
echo "</br>";
}
ingres_close($link);
?>
我得到这个错误:
( ! ) 致命错误:在第 2 行的 C:\wamp\www\tests\index.php 中调用未定义的函数 ingres_connect()
关于我的安装的一些信息:我有一个 windows 7 pro 32bits Wampserver 2.1 ( http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.1/WampServer2.1e-x32.exe/download ) Apache 2.2.17
PHP 5.3.5
Ingres 10.1.0 社区版(在此处下载:http: //esd.ingres.com/product/Community_Projects/Ingres_Database/Windows_32-Bit/Ingres_10.1_Build_121/ingres-10.1.0-121-gpl -win-x86-NoDoc.zip/http ) PHP 驱动在这里下载:http: //esd.ingres.com/product/drivers/PHP/Windows_32-Bit/PHP_Driver