安装 status.net 时出现问题
如何解决 PHP 中的已弃用和严格标准错误? 我在安装 status.net 代码时遇到这些错误:
已弃用:通过引用分配 new 的返回值是 在 /opt/lampp/lib/php/Mail.php 第 135 行已弃用
严格标准:非静态方法 StatusNet::_sn_to_path() 应该 不被静态调用 /opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php 第 266 行
严格标准:非静态方法 PEAR::getStaticProperty() 应该 不被静态调用 /opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php 第 277 行
严格标准:非静态方法 StatusNet::loadConfigFile() 应该 不被静态调用 /opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php 第 111 行
严格标准:Memcached_DataObject::delete() 的声明应该 与 DB_DataObject::delete() 兼容 /opt/lampp/htdocs/test/statusnet-0.9.6/classes/Memcached_DataObject.php 第 23 行
严格标准:Config::staticGet() 的声明应该是 与 Memcached_DataObject::staticGet() 兼容 /opt/lampp/htdocs/test/statusnet-0.9.6/classes/Config.php 第 31 行
严格标准:Config::pkeyGet() 的声明应该是 与 Memcached_DataObject::pkeyGet() 兼容 /opt/lampp/htdocs/test/statusnet-0.9.6/classes/Config.php 第 31 行
How can I solve the Deprecated and Strict standards errors in PHP?
I got these errors while installing the status.net code:
Deprecated: Assigning the return value of new by reference is
deprecated in /opt/lampp/lib/php/Mail.php on line 135Strict Standards: Non-static method StatusNet::_sn_to_path() should
not be called statically in
/opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php on line 266Strict Standards: Non-static method PEAR::getStaticProperty() should
not be called statically in
/opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php on line 277Strict Standards: Non-static method StatusNet::loadConfigFile() should
not be called statically in
/opt/lampp/htdocs/test/statusnet-0.9.6/lib/statusnet.php on line 111Strict Standards: Declaration of Memcached_DataObject::delete() should
be compatible with that of DB_DataObject::delete() in
/opt/lampp/htdocs/test/statusnet-0.9.6/classes/Memcached_DataObject.php
on line 23Strict Standards: Declaration of Config::staticGet() should be
compatible with that of Memcached_DataObject::staticGet() in
/opt/lampp/htdocs/test/statusnet-0.9.6/classes/Config.php on line 31Strict Standards: Declaration of Config::pkeyGet() should be
compatible with that of Memcached_DataObject::pkeyGet() in
/opt/lampp/htdocs/test/statusnet-0.9.6/classes/Config.php on line 31
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将以下行插入站点的 index.php 文件的顶部。
Insert the below line at the top of your site's index.php file.
这不是限制功能的“错误”。
更改
php.ini
中的error_reporting
设置,使其不包含 E_DEPRECATED 和 E_STRICT 错误。 php.ini 有相关示例。This are no "errors" that limit the functionality.
Change the
error_reporting
setting in yourphp.ini
to not include E_DEPRECATED and E_STRICT errors. The php.ini has examples for that.