2012-11-06 58 views
2

我使用的是xampp 1.7.0,但只是決定升級到xampp 1.8.1。我卸載了1.7,但沒有卸載htdocs和mysql服務器。
我現在安裝了1.8,並通過xampp安全頁面爲xampp目錄和mysql創建密碼。 不幸的是,我不能再查看我的網站,他們都給出錯誤,這是一個錯誤示例:升級到Xampp 1.8.1後,無法查看我的網站

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\3nity\libraries\joomla\import.php on line 29 
Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\3nity\libraries\loader.php on line 71 
Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\3nity\libraries\joomla\import.php on line 32 
Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\3nity\libraries\loader.php on line 71 
Strict Standards: Non-static method JLoader::register() should not be called statically in C:\xampp\htdocs\3nity\libraries\loader.php on line 138 
Strict Standards: Non-static method JRequest::clean() should not be called statically in C:\xampp\htdocs\3nity\libraries\joomla\import.php on line 33 
Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\xampp\htdocs\3nity\libraries\joomla\environment\request.php on line 463 

請我能做些什麼,因爲我沒有所有的網站,5年內的備份現在正與當前的客戶項目一起努力工作。

我使用win7操作系統64bit,使用xampp-win32-1.8.1-VC9-installer。

+0

應該移動到http://serverfault.com –

+1

如何將Joomla升級到最新版本? '以前做一個備份! (即使它現在不工作!)'最後的機會:降級回到1.7.0 – Nippey

+0

我的joomla是我升級我的xampp之前的最新版本。 – user1801410

回答

2

這可能是由於最新XAMPP中的PHP版本不同(更新版本)。對於錯誤代碼的警告,PHP 5.4(確切地說是PHP 5.4.7)更爲嚴格。

真正的問題是在實際的PHP代碼中(無論是你的還是代碼中使用的包,例如Joomla)。

如果它來自你的代碼,你應該修復它。通過以靜態方式訪問靜態方法屬性或屬性(例如,要訪問它的class Foo { public static $bar = 123; }Foo::$bar,以及使用class Bar { public static function foo() { } }Bar::foo()來調用它,請注意我們如何使用::而不是->。這意味着沒有活動實例化狀態(In換句話說,$bar = new Bar(); $bar->foo();是不正確的,它調用它作爲一個實例方法,而不是靜態地通過Bar::foo())。

而同樣,如果問題是周圍的其他方法,開發人員可能需要聲明一個方法static如果是無狀態並靜態調用。

對於Joomla案例,它似乎已有各種報告:

(僅通過粘貼在谷歌中發現錯誤!)

瞭解更多關於狀態和靜態之間的區別:

如果你只有警告(不是錯誤),看看「PHP的error_reporting」,以瞭解如何禁用這些無辜的警告(通過降低錯誤報告級別)。這樣你可以減少噪音,並可以專注於重要的事情。

在開發過程中,您可能不應該隱藏任何警告,以便您能夠發現它們並改進您的代碼。但是在生產中,隱藏警告並僅記錄錯誤可能會更好。

+1

對不起,如果這聽起來很愚蠢,我對編程一無所知,只是一個網頁設計師。我在哪裏可以得到 - 「php error_reporting」 – user1801410

+0

首先確保您使用的是最新版本的軟件(更新Joomla,其中的插件等,並首先進行備份!)。如果您仍然收到警告或Joomla的新版本出現問題,請考慮更改'php.ini'配置中的'error_reporting'設置。通過Google搜索瞭解如何。最好從好的文檔中找出你自己,你將會學到一些東西!我已經給出了足夠的觀點,我認爲。 – Krinkle

+0

我編輯了php.ini,我將錯誤報告設置爲ALL,但仍顯示錯誤。 – user1801410

0

經過所有提供的信息和鏈接後,我能夠克服嚴格的標準問題。我之前做出的改變並沒有反映出來,因爲我改變了錯誤的價值觀。 這就是我所做的: 我不得不編輯我的php.ini文件的第535行& 552,並將顯示錯誤設置爲OFF,並使用以下設置:error_reporting = E_ALL &〜E_NOTICE。 Joomla 1.5和2.5網站都不會再發生錯誤。 感謝大家。

+0

現在唯一的問題是,我無法通過mysql ibdata01文件恢復我的數據庫,我沒有在卸載xampp 1.8之前備份。希望您能逐步詳細瞭解如何通過這些文件恢復數據庫:ibdata01,ib_logfile1,ib_logfile0。這些是我在mysql數據文件夾中找到的唯一文件。 – user1801410