2010-08-21 120 views
1

我有一個Mambo CMS網站託管與000webhost。該網站由Mambo 4.6.2提供支持。和PHP Version 5.2.13安裝在000webhost Web服務器上。該網站運行良好。PHP致命錯誤:調用未定義的方法mosMenu :: mosDBTable()

自從我上次在網站上工作並且該網站不再有效後,我已將我的開發計算機的操作系統升級到Ubuntu 10.04。本機已安裝PHP版本5.3.2-1ubuntu4.2

我谷歌搜索'PHP致命錯誤:調用未定義的方法mosMenu :: mosDBTable()',這導致我這thread on the Mambo Forums

上面的線程建議在php.ini中使用以下設置:error_reporting = E_ALL | ~E_STRICTzend.ze1_compatibility_mode true。我想這一點,其產生17個附加錯誤:

PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 170 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 270 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 323 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 328 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/database.php on line 777 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 407 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 426 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 533 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 1148 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 1676 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2615 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2621 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2627 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2633 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2639 
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2668 
PHP Deprecated: Function ereg_replace() is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2978 
PHP Fatal error: Call to undefined method mosMenu::mosDBTable() in /home/mike/Public/mambo/includes/core.classes.php on line 897 

相同的代碼運行而不000webhost的服務器上的錯誤(其中也有PHP 5安裝)。我想知道的是,是否可以配置PHP 5/Apache 2來運行不推薦使用的代碼,而無需編輯代碼本身?

謝謝,
邁克

+0

你也應該有問題的代碼發佈:) – Sarfraz 2010-08-21 20:51:25

回答

0

這可能不是最適合你的答案,但我不會考慮閱讀this topic後使用曼波了。

這個人「andphe」是Mambo項目的管理員和程序員,他建議OP更改error_reporting設置。任何值得他們的鹽的PHP程序員都不會期望這能夠修復致命錯誤,因爲所有error_reporting都會隱藏這些消息。如果你有一個致命錯誤,無論錯誤報告級別是什麼,你的代碼仍然無法工作。您將無法看到錯誤消息。

像這樣的錯誤對項目灌輸不信任。我將繼續使用另一個CMS,如Joomla(這是Mambo的一個分支)或Drupal,可以說是當今最流行的基於PHP的CMS。

+0

是的,所有文件的權限/文件夾遞歸設置爲777 昨天,我試圖運行使用最新版本的XAMPP的Windows XP上的項目,這導致'PHP致命錯誤:調用未定義的方法mosMenu :: mosDBTable()錯誤'。 回到Ubuntu,我從Sourceforge下載了原始版本'MamboV4.6.2.tar.gz',並建立了一個全新的網站。安裝過程已成功完成,但安裝後嘗試訪問網站時出現相同的錯誤。 ... – unpossible 2010-08-22 20:33:16

+0

我也從我的網絡主機上下載了(工作)網站,並在Ubuntu上進行了設置,它在上面生成了相同的17個錯誤。 由我的開發服務器上的PHP 5的配置引起的問題,特別是'error_reporting'指令? '/etc/php5/apache2/php.ini'中的默認設置是'error_reporting = E_ALL&〜E_DEPRECATED'。我將它改爲'error_reporting = E_ALL&〜E_NOTICE',但仍然沒有喜悅。 我不知道下一步該做什麼。任何指針將是最受歡迎的。 – unpossible 2010-08-22 20:33:47

+0

@mej閱讀我更新的答案 – NullUserException 2010-08-22 20:54:33

相關問題