Magento shows a blank/empty page. How do I solve this?

白昼怎懂夜的黑 提交于 2019-12-04 06:58:17

问题


My Magento project not working after the cache cleared. It displays the only header.

The project was working fine but when I cleared cache from the Cache Management section in admin, the front-end stopped working. The only header section is visible, It showing blank page in place of Footer and content portion.


回答1:


Try this solution

It sounds like you want to enable Developer mode. Add this to your .htaccess file:

SetEnv MAGE_IS_DEVELOPER_MODE "true"

You may also want to enable display errors in index.php:

 ini_set('display_errors', 1);

The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.

I've got a more detailed posting here:

http://www.molotovbliss.com/debugging-tips-and-tricks-with-magento-commerce

Consider also installing XDebug

Hope this helps you!




回答2:


Use the following code in your index.php file

ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
    $error = error_get_last();
    echo("<pre>");
    print_r($error);
}

Just paste it at the top. I found the solution here.

Warning!

Only use this in developement servers, don't use it on your production site, it might reveal security vulnerabilities to hackers.



来源:https://stackoverflow.com/questions/35793664/magento-shows-a-blank-empty-page-how-do-i-solve-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!