2013-04-20 153 views
3

有時候,我在第三方服務器上創建了一個Joomla網站。現在,當我嘗試訪問的網站,我看到錯誤,如下列:Joomla網站投訴錯誤

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/chinfote/public_html/libraries/joomla/import.php on line 29 

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/chinfote/public_html/libraries/loader.php on line 71 

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/chinfote/public_html/libraries/joomla/import.php on line 32 

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/chinfote/public_html/libraries/loader.php on line 71 

Strict Standards: Non-static method JLoader::load() should not be called statically in /home/chinfote/public_html/libraries/loader.php on line 161 

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/chinfote/public_html/libraries/loader.php on line 138 

Strict Standards: Non-static method JRequest::clean() should not be called statically in /home/chinfote/public_html/libraries/joomla/import.php on line 33 

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/chinfote/public_html/libraries/joomla/environment/request.php on line 463 

在網上搜索後,我發現我應該做在php.ini文件中的一些變化。但在cPanel的文件管理器上,我找不到這個文件。 任何人都可以請幫我找到這個文件並解決這些錯誤。 或者有沒有其他解決上述問題的方法?

非常感謝提前。

〜Jahnavi

+1

有一些託管公司誰不爲php.ini提供接入。此外,我想你想關閉錯誤報告這應該首先在生產環境中完成,請聯繫您的託管公司以解決此問題。順便說一句,我認爲您可以關閉Joomla管理面板中的錯誤報告。 – HamZa 2013-04-20 17:09:47

+1

您可以關閉全局配置中的錯誤報告Joomla後端或要求你主持禁用嚴格的錯誤報告 – Lodder 2013-04-20 17:12:52

+0

我甚至無法訪問Joomla後端。同樣的錯誤也是如此。當聯繫主機公司時,他們sa證明他們不能解決編碼問題。 :(請再試一次,謝謝。請讓我知道如果還有其他事情我可以做。 – 2013-04-20 17:18:26

回答

0

你會發現它在(Linux)的/etc/php.ini中

試試這個方法:更換 的display_errors =開 - 關

的error_reporting = E_ALL>的display_errors = | E_STRICT - >使用error_reporting = E_ALL &〜E_NOTICE

+0

已檢查它...它不存在:( – 2013-04-20 17:11:14

+0

或者是有隻需要其他方式我可以解決上述問題?? – 2013-04-20 17:12:32

+0

你把你的網站放在一個共享服務器上嗎?還是你有一個專用的服務器,你可以n使用ssh連接到 – 2013-04-20 17:15:10

0

如果在你的Joomla根目錄中沒有php.ini文件做出新phi.ini文件中使用交友(創建一個新的文件),你用它

東西
+0

如何使用cPanel查找joomla根目錄?對於愚蠢的問題,第一次創建網站時感到抱歉。 – 2013-04-20 17:37:34

+0

你能看到public_html文件夾中的一些文件嗎? – underscore 2013-04-20 17:42:33

+0

是的,我做了以下操作:導航到public_html - > libraries - > joomla並在該文件夾中創建了一個名爲php.ini的文件,並在其中添加了以下幾行:display_errors = Off和error_reporting = E_ALL&〜E_NOTICE。但是在刷新我的網頁時,錯誤仍然出現在那裏:( – 2013-04-20 17:44:40

-1

有些主機不允許從文件夾的根目錄讀取PHP.ini。但是,如果他們這樣做,您可能需要爲您的/管理員文件夾添加另一個。這至少可以讓你進入後端。如果沒有,您可以通過您的htaccess文件設置這些PHP參數。可能需要更多的谷歌搜索,但應該有足夠的信息...

6

遏制警告是與修復它們不一樣

Joomla可能會有很多內置的功能,但它的安全歷史遠非例證。你有沒有安裝最新版本的Joomla?如果不是,那麼現在就這樣做。如果你仍然收到警告,然後report it as a bug

+0

你應該升級你的Joomla版本 – Ejaz 2013-04-21 11:23:15

-2

您可以將這些行添加到.htacces文件;如果你唯一的問題是顯示錯誤。

php_flag display_startup_errors off 
php_flag display_errors off 
php_flag html_errors off 
php_value docref_root 0 
php_value docref_ext 0 
-1
Strict Standards: Non-static method JLoader::import() should not be called 
statically in /home/chinfote/public_html/libraries/joomla/import.php on line 29 

你會發現它在server.. /etc/php.ini

試試這個方法:更換display_errors = Ondisplay_errors = Off

3

我也遇到過同樣的問題,我的配置是1.5的Joomla共享託管服務器上。

但是,託管服務提供商將PHP版本從5.2升級到5.4。似乎Joomla 1.5與PHP版本5.4不兼容,所以不要試圖阻止你的錯誤(當然這不是一個好主意),請嘗試調整你的共享主機上的PHP版本或者專用主機...

乾杯。如果有警告不要隱藏它 - 解決它... !!! :)

0

切換您的PHP版本到PHP 5。3

也改變使用error_reporting在您的Joomla配置文件(的configuration.php)

var $error_reporting = '6143'; 
0

只有當您返回到PHP 5.2,或者你將改變新版本的J 1.5工作,你就可以解決問題

8

Joomla 1.5在PHP 5.4中工作。

對於前端和後端,您可以粘貼此代碼index.php。這個對我有用!

//設置標誌,這是一個父文件

define('_JEXEC', 1); 

error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING); 
-1

只是做如下的php.ini文件:

;error_reporting = E_ALL | E_STRICT 
1

令人難以置信。 如果你所要做的只是隱藏信息,你顯然不是編碼員。 消息是有原因的。 在您的組件中找到該功能,並將靜態字放在它的前面。 函數導入( 改變靜態函數導入(

問題解決了。沒有隱藏

+1

而這正是得票最多的答案是這樣說。你有什麼重複的觀點? – GhostCat 2016-12-31 09:55:47