PHP's white screen of death

I installed LAMP from scratch on Amazon EC2: Apache/2.4.7, PHP 5.5.9-1ubuntu4.17, mysql Ver 14.14 Distrib 5.5.49

I use prestashop (1.4.1.5) but when I run it I get a white screen.

No error in the log or on screen.

I tried to find the line where it breaks and found that if I do:

    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

Only the first '1' is echoed.

What is going on?


Short answer: in the console run sudo php5enmod mcrypt

Long answer:

The cookie.php file has a

    /**
      * Magic method wich add data into _content array
      *
      * @param $key key desired
      * @param $value value corresponding to the key
      */
    public function __set($key, $value)

which is executed when doing: $this->id_lang = ??? , this function is calling some other function that use the encrypt() function.

If u didn't do sudo php5enmod mcrypt it will crash the php silently and waist half a work day.


You need a ; in this line:

$this->id_lang = $t

So:

$this->id_lang = $t;
链接地址: http://www.djcxy.com/p/69192.html

上一篇: 死亡的白色屏幕

下一篇: PHP的死亡白屏