2017-08-03 38 views
1

我试图用PHP 5.6运行我的Joomla 1.x的网站,并得到了以下错误:的Joomla 1.5.x的网站工作与PHP 5.3,但不与PHP工作5.6

Strict Standards: Declaration of KHttpUri::set() should be compatible with KObject::set($property, $value = NULL) in /home/beauty/www/libraries/koowa/http/uri.php on line 0 Strict Standards: Declaration of KHttpUri::get() should be compatible with KObject::get($property = NULL, $default = NULL) in /home/beauty/www/libraries/koowa/http/uri.php on line 0 Strict Standards: Non-static method JLoader::register() should not be called statically in /home/beauty/www/libraries/joomla/cache/cache.php on line 19 Strict Standards: Declaration of JCacheStorage::get() should be compatible with JObject::get($property, $default = NULL) in /home/beauty/www/libraries/joomla/cache/storage.php on line 0 Strict Standards: Non-static method JLoader::register() should not be called statically in /home/beauty/www/libraries/joomla/document/document.php on line 19 Strict Standards: Non-static method JLoader::import() should not be called statically in /home/beauty/www/libraries/loader.php on line 186 Strict Standards: Non-static method JLoader::import() should not be called statically in /home/beauty/www/libraries/loader.php on line 186 Fatal error: Call-time pass-by-reference has been removed in /home/beauty/www/plugins/content/listitems.php on line 95

网站与工作正常之前PHP 5.3(在Ubuntu 12.X LTS上),所以这可能与PHP 5.3/5.6的兼容性有关。

有谁知道这是什么?这可能涉及哪些PHP扩展?

+0

你是否也改变了php.ini文件? - 禁用严格的标准? –

+0

我没有更改php.ini,但我有“error_reporting = E_ALL&〜E_DEPRECATED&〜E_STRICT” – Koban

+0

,但在PHP 5.3中,我有'error_reporting = E_ALL&〜E_DEPRECATED',我的网站正常工作。很可能PHP 5.3和5.6中的这两个设置都是等价的,因为E_ALL在PHP 5.6中发生了变化。 – Koban

回答

0

对这样一个旧的Joomla版本进行修补并使其通过php 5.6运行是没有意义的。 Joomla 1.5.x不兼容PHP 5.4和5.6;这是旧的,但仍然可用:docs.joomla.org/Joomla_1.5_won't_work_on_PHP_5.4。尽管如此,库库瓦并不是Joomla本身的一部分,您可以重命名类的声明,将所有称为静态的函数(即JLoader :: register())重命名为静态函数等。但是您仍在使用不安全的旧库/插件/组件和Joomla版本。也许你已经更改了其他地方的错误报告(.htaccess),你应该看看http://php.net/manual/en/appendices.php。您应该更好地将您的网站迁移到最新的Joomla3.7.4和PHP7 ... 顺便说一下,Call-time pass-by-reference has been removed in /home/beauty/www/plugins/content/listitems.php on line 95可以像PHP 5.4 Call-time pass-by-reference - Easy fix available?一样解决,通常函数调用不使用@。请同时指定Joomla的确切版本(请在您的问题中),1.0和1.5之间以及1.7是巨大的差异!

+0

Joomla版本是1.5.23。我没有.htaccess,因为我使用Nginx,并且在php.ini中禁用了E_STRICT。 – Koban

+0

迁移到Joomla 3.7是浪费时间的过程,有一些自定义的PHP代码和VirtueMart组件。如果很难使用PHP 5.6工作,我可以在Docker容器中轻松安装带有Ubuntu 12.04的PHP 5.3,但我不确定这是个好主意。 – Koban

+0

这是旧的,但仍然可用:https://docs.joomla.org/Joomla_1.5_won't_work_on_PHP_5.4。从1.5到最新版本的迁移过程确实是一项艰巨的任务,特别是使用自定义代码和Virtuemart。但是如果你想通过这样的网页去上网,那么迁移Joomla是必须的(由于安全性)。 –

-1

这些只是严格和标准的警告,所以你可以将全局配置参数调试设置为无,所有警告都将消失。

更好的办法是检查代码并手动修复PHP 5.6处理 - 没有开发者会给你支持Joomla!v1.5了,所以你必须自己修复它。

+0

请仔细阅读整个任务(2天前),有一个_Fatal_ _error_:通过引用的呼叫时传递已在95行的/home/beauty/www/plugins/content/listitems.php中删除。再次: Joomla 1.5不兼容PHP 5.4,所以它使用PHP 5.6(链接已经发布)。 –