TomatoCart-v1.1.8.2部署时报错
一、异常信息
Strict Standards: Non-static method osC_Database::connect() should not be called statically in C:\xampp\htdocs\TomatoCart\install\templates\pages\step_6.php on line 16
Strict Standards: Declaration of osC_Database_mysql::connect() should be compatible with & osC_Database::connect($server, $username, $password, $type = 'DB_DATABAS...') in C:\xampp\htdocs\TomatoCart\includes\classes\database\mysql.php on line 311
这是由于php版本引起的,php5.4.5高版本中mysql::connect()已经废除此方法。
二、 解决办法
Please find the following code in the install/includes/application.php:
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
} else {
error_reporting(E_ALL & ~E_NOTICE);
}
替换为
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
} else {
error_reporting(E_ALL & ~E_NOTICE);
}
|
作者:沙漏哟 出处:计算机的未来在于连接 本文版权归作者和博客园共有,欢迎转载,请留下原文链接 微信随缘扩列,聊创业聊产品,偶尔搞搞技术 |