一旦這個網站移動到另一臺服務器,我收到以下錯誤:PHP梨缺少「MDB2.php」
Fatal error: require_once(): Failed opening required 'MDB2.php' (include_path='.:/usr/lib/php5.4:/usr/lib/php5.4/') in /homepages/14/xxxxxx/htdocs/public_html/includes/pdbconnection.php on line 3
我擡頭一看,其中梨可能通過的phpinfo(位於)和我得到了這個(--with-pear=/usr/lib/php5.4
)這就是爲什麼它在那裏尋找MDB2.php。
雖然它是共享主機我有SSH訪問權限。從我做了什麼研究,似乎打字pear install MDB2
應該可以解決一切,但是當我做,我得到如下回應:
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update Cannot install, php_dir for channel "pear.php.net" is not writeable by the current user
這使我相信我沉沒......我是誰? :-(
感謝所有幫助
當我鍵入pear list
我得到以下(如果這是任何使用)!
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.1 stable
DB 1.7.13 stable
HTML_Template_IT 1.1 stable
HTTP 1.4.0 stable
HTTP_Header 1.2.0 stable
Mail 1.1.14 stable
Net_SMTP 1.2.10 stable
Net_Socket 1.0.8 stable
Net_UserAgent_Detect 2.0.1 stable
PEAR 1.5.0 stable
Structures_Graph 1.0.2 stable
XML_Beautifier 1.1 stable
XML_Parser 1.2.8 stable
XML_RPC 1.5.1 stable
XML_Util 1.1.4 stable
感謝
MDB2的最新版本是2012-10-29 ...可能不支持PHP 5.4?見:http://pear.php.net/package/MDB2/redirected – Raptor
@ShivanRaptor謝謝,非常有趣!我發現最初有一些問題也出現在5.3上,但是他們似乎已經根據這個來解決:http://stackoverflow.com/questions/1530112/replacement-for-pear-mdb2-on-php-5- 3?RQ = 1。我想知道5.4的狀態是什麼。 –
那麼您可能必須使用替代庫。 – Raptor