简体   繁体   English

从5.3升级到5.4显示空白站点

[英]Upgrading from 5.3 to 5.4 shows a blank site

I am on a local server using ampps and I can change php version from 5.3 to 5.4 but when on 5.4 than my website just goes blank. 我在使用ampps的本地服务器上,可以将php版本从5.3更改为5.4,但是在5.4上时,我的网站就空白了。 Error reporting is turned on to error_reporting(E_ALL | E_STRICT), but still don't get any errors in order to fix any problems with 5.4 错误报告已打开到error_reporting(E_ALL | E_STRICT),但仍然没有得到任何错误以解决5.4中的任何问题

What can I do to debug and get all errors to show? 我该怎么做调试并显示所有错误? Thanks in advance. 提前致谢。

Edit: All errors are turned on in the corresponding php.ini file but still just blank 编辑:在相应的php.ini文件中打开了所有错误,但仍然只是空白

Enable all error message with error_reporting(E_ALL) when you change the PHP-Version you have a new php.ini file. 当您更改PHP版本时,使用error_reporting(E_ALL)启用所有错误消息,您有一个新的php.ini文件。 Go in that file and enable the option display_errors then you get all errors and informations. 进入该文件并启用选项display_errors,然后您将获得所有错误和信息。

Otherwise set that option in your application ini_set('display_errors', 'On'); 否则在您的应用程序中设置该选项ini_set('display_errors', 'On');

Responding to my own question 回答我自己的问题

I located the error by using the code provided in this post as suggested by Mike B : 我按照Mike B的建议使用了本文提供的代码来定位错误:

PHP's white screen of death PHP的白屏死机

In one of my session variables I had suppressed errors with '@' @$_SESSION['sessionname']; 在我的一个会话变量中,我用'@' @$_SESSION['sessionname'];抑制了错误@$_SESSION['sessionname']; which made the error not to show and for that reason white screen of death. 这使错误不显示,并因此导致死亡白屏。

Fixed! 固定! Thanks for the help. 谢谢您的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM