我在Amazon EC2上从头开始安装LAMP:Apache/2.4.7, PHP 5.5.9-1ubuntu4.17, mysql Ver 14.14 Distrib 5.5.49
我使用prestshop(1.4.1.5),但是当我运行它时,我得到一个白屏。
日志和屏幕上没有错误。
我试图找到它的断行,发现如果我这样做:
if (!Language::getLanguage((int)$this->id_lang)) {
$t = Configuration::get('PS_LANG_DEFAULT');
echo 1;
$this->id_lang = $t;
echo 1;
}
on/classes/Cookie.php line: 277
只回显第一个"1"。
怎么回事?
简短的回答:在控制台中运行sudo php5enmod mcrypt
长答:
cookie.php文件有一个
/**
* Magic method wich add data into _content array
*
* @param $key key desired
* @param $value value corresponding to the key
*/
public function __set($key, $value)
在执行:$this->id_lang = ???
时执行,此函数正在调用使用encrypt()函数的其他函数。
如果你不做sudo php5enmod mcrypt
,它会无声地使php崩溃,并花费半个工作日的时间。
这一行需要一个;
:
$this->id_lang = $t
:
$this->id_lang = $t;