安裝 Concrete5 遇到 Strict Standards: Non-static method.......
安裝 Concrete5 (v5.5.1) 正打開index 做installation 時遇到大量:
Strict Standards: Non-static method Loader::database() should not be called statically in/xxx/concrete5.5.1/concrete/dispatcher.php on line 23
Strict Standards: Non-static method Loader::library() should not be called statically in/xxx/concrete5.5.1/concrete/libraries/loader.php on line 177
Strict Standards: Non-static method Loader::library() should not be called statically in/xxx/concrete5.5.1/concrete/libraries/loader.php on line 178
Strict Standards: Non-static method Loader::library() should not be called statically in/xxx/concrete5.5.1/concrete/libraries/loader.php on line 177
Strict Standards: Non-static method Loader::library() should not be called statically in/xxx/concrete5.5.1/concrete/libraries/loader.php on line 178
Google 了很久,就簡單在 http://php.net/manual/de/function.error-reporting.php 內 "info at hephoz dot de 14-Aug-2008 06:34" 的留言找到解決方法:
在Concrete5 的root 把index.php 改成index2.php, 然後建立新的index.php,其內容是:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("index2.php");
?>
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("index2.php");
?>
大功告成!
PS: PHP5.3.5, Apache2.2.17