1 php5.4下安裝的時候處理問題,Strict Standards: Non-static method cls_image::gd_version() should not be called statically in \install\includes\lib_installer.php on line 31
解決:找到install/includes/lib_installer.php中的第31行 return cls_image::gd_version();然後在找到include/cls_image.php中的678行,發現gd_version()方法未聲明靜態static,所以會出錯。這時候只要:
將function gd_version()改成static function gd_version()即可。
2 安裝好後出現Warning: require(languages//common.php): failed to open stream: No such file or directory in \includes\init.php on line 120
緩存問題 缺少配置信息 缺少文件temp\static_caches/shop_config.php
經測試在ecshop論壇http://help.ecshop.com/data/backup/ECShop_V2.7.3_UTF8_release1106.rar下載的文件有問題,重新到http://download.ecshop.com/2.7.3/ECShop_V2.7.3_UTF8_release1106.rar 下載後測試沒問題。
3 安裝好後出現 Strict standards: Only variables should be passed by reference in \includes\lib_main.php on line 1329
$ext = end(explode('.', $tmp));
修改為:
$ext = explode('.',$tmp);
$ext = end($ext);
Strict standards: Only variables should be passed by reference in \includes\cls_template.php on line 418
tag_sel = array_shift(explode(' ', $tag));
修改為:
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
array_shift() 的參數是引用傳遞的,5.3以上默認只能傳遞具體的變量,而不能通過函數返回值 end(&array) 也一樣(後面也會有end的函數,也需要拆分為兩行)。
修改後到後台更新緩存
4 後台 Strict standards: Redefining already defined constructor for class alipay in \includes\modules\payment\alipay.php on line 85
後台更新緩存
5 Strict standards: mktime(): You should be using the time() function instead in \admin\sms_url.php on line 31 php版本問題 mktime()修改為 time() 6 Strict standards: Redefining already defined constructor for class alipay in \includes\modules\payment\alipay.php on line 85Call Stack
這裡是php4與php5的區別
PHP4中構造方法是一個與類同名的方法,而從PHP5開始,用__construct()做為構造方法,但仍然支持PHP4的構造方法。如果同時使用的話,如果 同名方法在前的話,則會報錯
只需要把 function __construct()移到同名函數之前
7 Deprecated: Assigning the return value of new by reference is deprecated in \admin\sitemap.php on line 46
$sm =& new google_sitemap();
在5.3版本之後已經不允許在程序中使用”=&”符號。如果你的網站出現了Deprecated: Assigning the return value of new by reference is deprecated in 錯誤,別著急,先定位到出錯的文件,查找下是不是在程序中使用了”=&”,例如阿茲貓剛才定位到網站程序中發現了下圖的程序,發現使用了”=&”符號,去掉‘&’符號之後程序運行正常。 8 PHPStrict Standards: Declaration of ucenter::login() should be compatible with integrate::login($username, $password, $remember = NULL) in \includes\modules\integrates\ucenter.php on line 52 PHP Strict Standards: Declaration of ucenter::add_user() should be compatible with integrate::add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '') in \includes\modules\integrates\ucenter.php on line 52 PHP Strict Standards: Declaration of ucenter::set_cookie() should be compatible with integrate::set_cookie($username = '', $remember = NULL) in \includes\modules\integrates\ucenter.php on line 52 PHP5.4,子類的方法名如果和父類方法名相同,則子類的參數列表也要和父類的參數列相同。