php joomla1.7 中的严格标准错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7137457/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Strict Standards error in joomla1.7
提问by shanmugam
I'm trying to create a web page using Joomla and XAMPP.
我正在尝试使用 Joomla 和 XAMPP 创建一个网页。
I'm getting Strict Standardsin all parts of page... This is annoying.
我在页面的所有部分都采用了严格的标准……这很烦人。
Strict Standards: Static function JDatabase::test() should not be abstract in C:\xampp\htdocs\Joomla17\libraries\joomla\database\database.php on line 350
Strict Standards: Accessing static property JCache::$_handler as non static in C:\xampp\htdocs\Joomla17\libraries\joomla\cache\cache.php on line 394
Strict Standards: Accessing static property JCache::$_handler as non static in C:\xampp\htdocs\Joomla17\libraries\joomla\cache\cache.php on line 396
严格标准:静态函数 JDatabase::test() 不应抽象在 C:\xampp\htdocs\Joomla17\libraries\joomla\database\database.php 第 350 行
严格标准:在 C:\xampp\htdocs\Joomla17\libraries\joomla\cache\cache.php 第 394 行将静态属性 JCache::$_handler 作为非静态访问
严格标准:在 C:\xampp\htdocs\Joomla17\libraries\joomla\cache\cache.php 第 396 行将静态属性 JCache::$_handler 作为非静态访问
One more thing i tried to change php.ini file. I have two files in Joomla 1.7. php INI-Devlolpment php INI-Production
我尝试更改 php.ini 文件的另一件事。我在 Joomla 1.7 中有两个文件。php INI-开发 php INI-生产
Whats difference between both?
两者有什么区别?
I tried many thing to switch off strict standards:
我尝试了很多方法来关闭严格的标准:
; display_errors
; Default Value: Off
; Development Value: Off
; Production Value: Off
; 显示错误
; 默认值:关
; 开发值:关闭
; 产值:关闭
also
还
; error_reporting
; Default Value: E_ALL & ~E_DEPRECATED
; Development Value: E_ALL & ~E_DEPRECATED
; Production Value: E_ALL & ~E_DEPRECATED
; 错误报告
; 默认值:E_ALL & ~E_DEPRECATED
; 开发价值:E_ALL & ~E_DEPRECATED
; 生产价值:E_ALL & ~E_DEPRECATED
also
还
error_reporting = E_ALL & ~E_DEPRECATED
error_reporting = E_ALL & ~E_DEPRECATED
also
还
display_errors = Off
display_errors = 关闭
Still i'm getting these errors?
我仍然收到这些错误?
Please help me to solve this.. Thanks, Shanmugam
请帮我解决这个问题..谢谢,Shanmugam
回答by jeeradate
go to the file that cause error and change $this->_handler to self::$_handler
转到导致错误的文件并将 $this->_handler 更改为 self::$_handler
回答by RiaD
display_errors = Off
should work. To find where it seted to On It maybe
应该管用。找到它设置为 On It 的位置
- php.ini
- httpd.conf
- .htaccess
- php code
- 配置文件
- 配置文件
- .htaccess
- 代码
To know what files used as php.ini you can use phpinfo(); and find path php.ini there
要了解用作 php.ini 的文件,您可以使用 phpinfo(); 并在那里找到路径 php.ini
回答by Kaleem Sajid
Simplest solution to this problem is:
这个问题最简单的解决方法是:
- Go to "administrator" window
- Under "global configuration" select "server"
- In "server settings" set "Error Reporting" to "none" or "simple".
- 转到“管理员”窗口
- 在“全局配置”下选择“服务器”
- 在“服务器设置”中,将“错误报告”设置为“无”或“简单”。
回答by fiore77ro
run-C:\xampp\php\php.ini; open with Notepad, Ctrl+H; find: e_strict, replaced:-empty-; replaced all; save; close.
运行-C:\xampp\php\php.ini; 用记事本打开,Ctrl+H;查找:e_strict,替换为:-empty-;全部替换;节省; 关闭。
回答by Poonam Kaur
Stop Apache and mysql services ( you may have to do it through SCM in Xampp control Panel)
open c:/xampp/php/php.ini
find Display_Error
there are two entries for Display_error one is with ; in start that is a comment second without ;
change Display_Error Off ( default it is On)
Start the services back.
http://localhost/joomla###and it should work.
停止 Apache 和 mysql 服务(您可能必须通过 Xampp 控制面板中的 SCM 来完成)
打开 c:/xampp/php/php.ini
找到 Display_Error
Display_error 有两个条目,一个是 ; 在开始是评论第二个没有;
更改 Display_Error Off(默认为 On)
重新启动服务。
http://localhost/joomla###它应该可以工作。
**For those using Xampp 1.7.4, etc. the file is /opt/lamp/etc/php.ini
**对于那些使用 Xampp 1.7.4 等的文件是 /opt/lamp/etc/php.ini
回答by gmndede
In my php.ini in the XAMPP lines below
在我的 php.ini 中的 XAMPP 行中
532 ;http://php.net/display-errors
533 display_errors = On
to
到
532 ;http://php.net/display-errors
533 display_errors = Off
Stopped and then restarted Apache server and that make the annoying errors disappear.
停止然后重新启动 Apache 服务器,这使烦人的错误消失了。
回答by IberoMedia
Change file php/config.php
更改文件 php/config.php
CHANGE LINE: error_reporting = E_ALL | E_STRICT
更改线路: error_reporting = E_ALL | E_STRICT
TO: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
到: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
回答by Gaurang
Joomla adminpanel:=
Joomla 管理面板:=
Go to "administrator"
Under "global configuration" select "server"
In "server settings" set "Error Reporting" to "none" or "simple".
回答by surge
open xampp/php/php.ini
with WordPad, then make Ctrl+F
type Display_Error
push find, there are two findings, yours is second. you'll see display_errors
line with "on" next to it, just change it to off, Ctrl+s
(you must save). should work
xampp/php/php.ini
用写字板打开,然后Ctrl+F
输入Display_Error
push find,有两个发现,你的第二个。您会display_errors
在旁边看到带有“on”的行,只需将其更改为关闭即可Ctrl+s
(您必须保存)。应该管用