簡體   English   中英

在我的 WAMP 服務器上安裝 php 的 ingres 擴展

[英]Install ingres extension for php on my WAMP server

我有一台開發計算機,在 windows 下運行。

對於一個項目,我必須創建一個必須連接到 Ingres 數據庫服務器的 php 網站。

所以我安裝了 wamp,我安裝了 ingres(服務器和客戶端,在我的本地機器上)。

I added the library that I found on their site( php_ingres.dll ) in the C:\wamp\bin\php\php5.3.5\ext folder, and I added a line " extension=php_ingres.dll " in the configuration file.

我關閉 wamp 並重新啟動它,然后重新啟動服務器,我現在在 wamp 菜單中看到一個復選標記,表明 php_ingres 現在已激活。 但是當我 go 到服務器的歡迎頁面時,我沒有看到這個擴展已加載。 如果我在 php 信息頁面上看到 go,我在配置命令中看不到任何 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 中未定義的 function ingres_connect()

Some information on my installation: I've a 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

要實際測試擴展是否已加載,您也可以調用其中一個函數。 如果加載了擴展,您應該不會因為缺少 function 而收到致命錯誤。 這可能是最快的檢查之一。

另一項檢查是使用extension_loaded *PHP Manual** ,它將為您提供所有已加載擴展的列表。 有關詳細信息,請參閱上面的 PHP 手冊鏈接。

配置行

配置行不會顯示 ingres 擴展名,因為它尚未被編譯。這完全沒問題,因為您將其作為擴展名( .dll )加載,因此它不是php.exe的一部分。 這就是為什么您在配置行中看不到它的原因。

在 phpinfo() 頁面上定位ingres

phpinfo()頁面上,在瀏覽器中使用搜索 function(通常是CTRL+F )並嘗試找到單詞ingres 如果已加載,您應該找到一個顯示擴展默認設置的部分。

以下是 xdebug 擴展的示例屏幕截圖。 對於 ingres,這可能看起來很相似:

Successfully installed xdebug extension (Screenshot) 圖片來自: 在 Eclipse 中啟動 xdebug 卡在 57% - 如何排除故障?

仔細檢查您的extension_dir設置以及正在使用的實際php.ini文件。 如果通過 Apache(或 IIS)在腳本中執行phpinfo() ,從命令行調用php.exe -i可能不會給出相同的 output。 事實上http://www.wampserver.com/en/faq.php說有 3 個潛在的php.ini腳本。

問題是我沒有在本地安裝 ingres 客戶端,所以看起來這個庫沒有它就無法工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM