2015-04-30 124 views
1

我有Windows Server 2008 R 2標準wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b。wamp + oracle連接

我跟隨由Oracle提供的說明,當然使用WAMP安裝:Article

我使用Oracle即時客戶端版本:instantclient-基本-NT-11.2.0.4.0

問題是,當我在httpd.conf中啓用這些行時,任何調用的php文件都會給出錯誤「Forbidden 您無權訪問此服務器上的/path/file.php。」

FcgidInitialEnv PHPRC "C:/new_wamp/bin/php/php5.5.12/" 
AddHandler fcgid-script .php 
FcgidWrapper "C:/wamp/bin/php/php5.5.12/php-cgi.exe" .php 

也有錯誤的PHP錯誤日誌:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:/wamp/bin/php/php5.5.12/ext\php_oci8_11g.dll' - %1 is not a valid Win32 application. in Unknown on line 0

instantclient是32位版本。據我從以前的安裝中發現,大多數問題是在64bit instantclient

有什麼建議嗎?

謝謝!

+0

WAMPServer將PHP用作Apache Extension而不是FastCGI。它可能將其轉換爲FastCGI,但不是必需的。當您嘗試將PHP用作FastCGI時,我會想象您沒有移除Apache PHP模塊,這可能是您的直接問題。 – RiggsFolly

+0

好的,所以我只需要安裝** wamp **和** 32bit instantclient **就可以連接到oracle db? – Jarno

+0

這只是我現在收到的錯誤。模塊未註釋並處於正確的路徑。 **調用未定義函數oci_connect()** 這是在php錯誤日誌和網站上。 ** phpinfo **告訴正確路徑到** instantclient **。 有點想法在這裏..? – Jarno

回答

0

我明白了。問題是,它仍然使用instantclient的一些64位文件。解壓縮包時我犯了一個錯誤。