上傳vmall5源碼到服務器后訪問ebak目錄,發現網頁不顯示。用xshell登錄到服務器手動執行ebak/index.php查看輸出,發現這樣一個錯誤:
PHP Parse Error: syntax error, unexpected $end ,blablabla...
這是因為php沒有開啟短標簽。在php.ini中找到并設定:
short_open_tag = On
另一個錯誤,直接php解釋執行根目錄的index.php發現說數據庫沒有指定。那就到報錯的文件,手動指定:
vim /var/www/html/app.hzyuanjian.cn/app/frontend.base.php +565
$mod->db->query('use my_database');
第三個錯誤是時區問題。依然執行根目錄的index.php,提示說
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /var/www/html/xxxxxx/eccore/controller/message.base.php on line 180
解決辦法:依舊是修改php.ini,找到并修改為:
date.timezone = "Asia/Shanghai"
然后,重啟httpd進程:
service httpd restart
文章列表