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);
  }



 


posted @ 2012-12-15 11:44  沙漏哟  阅读(199)  评论(0编辑  收藏  举报