48

I have an error in my Magento backend that results in a blank screen (WSOD). I have set errors to on in admin but there is nothing being created in var/logs/. (I have checked permissions for that directory and all is correct).

I have also ini_set('display_errors', 1) in index.php and Magento is set to developer mode. I have also enabled apache and php error logs.

No errors are being logged though?!

Anyone have a clue as to why errors aren't being shown? As I'm confused! Thanks

Sergio
  • 28,539
  • 11
  • 85
  • 132
sulman
  • 2,431
  • 7
  • 40
  • 62
  • *Update* Well as much as I'd like to accept an answer I don't believe that there is one stand alone answer to this issue. Most seem to agree that the first thing to check is the memory but in my experience this isn't the answer for my issue. I'll leave this open though and hopefully it might act as a resource for others. Thanks. – sulman Aug 13 '12 at 08:26
  • 4
    To my experience *no* update of magento was ever successful on first try. There are so many pitfalls and errors in the update scripts.... I´m so happy to have it inside a virtual machine wich supports snapshots... I couldn´t imagine to run it on a normal webspace without this kind of failsafe. – cljk Nov 11 '13 at 09:57
  • 1
    @sulman app/code/core/Mage/Core/Functions.php mageCoreErrorHandler overrides the default PHP error handler. So in case of memory error or any other FATAL error it fails , atleast for most of the people who sort this issue out when they increase the PHP memory limit. – Haijerome Sep 12 '14 at 17:47
  • Another great source is this magento.stackexchange Q&A => http://magento.stackexchange.com/questions/428/fundamentals-for-debugging-a-magento-store – Fiasco Labs Dec 05 '15 at 05:38

18 Answers18

70

This is how I got it corrected(Hope will help you guys):

  1. 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);
    }
    
  2. In my case it tolde me that error/503.php was unavailable.

3.The issue was with testimonial extension I used(http://www.magentocommerce.com/magento-connect/magebuzz-free-testimonial.html)

  1. I deleted the testimonial.xml file in my app/etc/modules/testimoanial.xml.
  2. delete “maintenance.flag" file.
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62
Shashank Saxena
  • 2,014
  • 17
  • 11
  • Very useful! Told me about an error with SourceGuardian and the PHP version I was using. – johnsnails Mar 30 '16 at 03:17
  • @shashank thanks a ton. it was very useful for me to identify the issue on production server. – Pradeep Sanku Sep 15 '16 at 04:43
  • Warning: This will cause bugs, I was unable to edit customers after this because it corrupts the json response from isAjax – Black Feb 14 '19 at 10:30
  • Very helpful, this was the only way I could see required file missing with Redis caching enabled. Nothing was shown in /var/logs or PHP error log, and just turning on display errors didn't help either. Thanks – Jan Zikmund Mar 25 '19 at 02:37
19

Whenever this happens the first thing I check is the PHP memory limit.

Magento overrides the normal error handler with it's own, but when the error is "Out of memory" that custom handler cannot run, so nothing is seen.

clockworkgeek
  • 37,650
  • 9
  • 89
  • 127
  • Hmm interesting suggestion. Thanks for this. I'll check my memory settings. – sulman Jan 24 '11 at 19:50
  • @clockworkgeek You are spot on. I confirm in my case apparently its because of PHP memory limit. So if am not wrong if any one experience this issue they must tap on this file app/code/core/Mage/Core/functions.php mageCoreErrorHandler method. Please correct me if am wrong. – Haijerome Sep 12 '14 at 17:44
13

Same problem, I have just purged cache

rm -rf var/cache/* 

Et voila ! I don't understand what it was...

Jona
  • 1,156
  • 10
  • 16
6

Following can be the reasons for the blank pages in magento

1) File or Directory permission issues. If you are migrating from one server to another remember to give 755 permission to the directories and files

2) If you were working on an xml file and suddenly the pages go blank. Check you might not have commented the code lines properly.An unclosed comment will also create the problem.

3) There may be issue because of insufficient memory allocation for memory_limit.

4) Try clearing the var/cache folder contents

5) Try clearing the var/session folder contents

6) If your extensions use ioncube loader on production then install ion cube on development server also.(Like for extendware extensions).Though you may have ion cube loader try installing the latest version.Because some time when you update the extensions which depends on ion cube there is incompatibility with older versions.

7) Set short_open_tag = On in php.ini .Some times developers use <? ?> tags and if the short_open_tag is not set to on you may face problems like half distorted page etc.

8) Increase max_input_vars and post_max_size values for php. It helps when you try to save large number of tax rates in a tax rule and get a blank page.

Mukesh
  • 7,630
  • 21
  • 105
  • 159
4

This could be as simple as a template conflict. Revert to default template in System/Configuration/Design/Themes.

Andro Selva
  • 53,910
  • 52
  • 193
  • 240
user4015
  • 217
  • 4
  • 13
3

I too had the same problem, but solved after disabling the compiler and again reinstalling the extension. Disable of the compiler can be done by system-> configration-> tools-> compilation.. Here Disable the process... Good Luck

Pavan Kumar
  • 1,735
  • 2
  • 28
  • 47
1

I had the same problem, it was solved after re-installing my Theme

1

It can also be when you don't have a proper php extension loaded. I would double check that you have all of the required php extensions loaded on your system if it isn't the memory limit issue.

dan.codes
  • 3,523
  • 9
  • 45
  • 59
1

I was also facing this error. The error has been fixed by changing content of core function getRowUrl in app\code\core\Mage\Adminhtml\Block\Widget\Grid.php The core function is :

public function getRowUrl($item) 
{ 
$res = parent::getRowUrl($item); 
return ($res ? $res : ‘#’); 
}

Replaced with :

public function getRowUrl($item) 
{ 
return $this->getUrl(’*/*/edit’, array(’id’ => $item->getId())); 
}

For more detail : http://bit.ly/iTKcer

Enjoy!!!!!!!!!!!!!

Sanjeev Kumar Jha
  • 1,213
  • 2
  • 12
  • 20
0

Just ran into this issue and lost the whole day solving it. Try to increase memory_limit, that worked for me!

user
  • 86,916
  • 18
  • 197
  • 190
Kajal
  • 1
0

I have also experienced the same problem when uploading the magento project to my webserver, In my case the zip file is corrupted during the upload process and many of my php files are also damaged. I have uploaded via ftp. I have found the solution for this. If you are making the zip file from linux machine, try to use command line tool (For example: ie;

zip -r my_archive.zip /path/of/files/to/compress/ )

and do upload to your web server from windows filezilla client.

  • 1
    Personally (if I'm not tar balling) then this is the exact method I use. Interesting info though. – sulman Aug 13 '12 at 07:58
0

This may also be caused by using the xDebug bookmarks when debugging the page. Just stop debugger (remove cookie) and it will go back to normal.

augsteyer
  • 1,039
  • 10
  • 25
0

As you said - there is one stand alone answer to this issue.

I had same issue after changing theme. Memory was set to 1024 before, so that's not the problem. Cache was cleared and there was nothing useful in error log.

In my case solution was different - old theme had custom homepage template... Switching it to standard one fixed it.

arekstasiewicz
  • 383
  • 2
  • 11
  • 24
0

ANOTHER REASON

for a white screen without error messages might be fragmentation of the APC cache.

Use phpinfo() to find out if it is used by your page (we had issues with PHP 5.4 + APC 3.1.13) and if so see what happens when you either

  • disable it via .htaccess: php_flag apc.cache_by_default off
  • clear the apc cache every time the page is called: add at the top of index.php apc_clear_cache(); (no solution but good to see if the APC is the problem)

If you do have the APC and it is the problem, then you could

  • play around with its settings, which might be cumbersome and still not work at all
  • just update to PHP 5.5 and use its integrated opcode cache instead.
Community
  • 1
  • 1
Larzan
  • 9,389
  • 3
  • 42
  • 41
0

I tried all the suggested solutions but no luck.

Finally I found I need to use admin layout & template & skin from a fresh Magento version that you need to upgrade to. For example in my case it is 1.9.2.4

  • Use adminhtml layout & template to make the admin theme can be loadable

-- Basically, get all the files (from app/design/adminhtml/default of the fresh version), copy and paste these to the folder app/design/adminhtml/default of the current site to replace all the old files if any

  • Use adminhtml skin to make the admin theme can be displayed correctly

-- Basically, get all the files (from skin/adminhtml/default of the fresh version), copy and paste these to the folder skin/adminhtml/default of the current site to replace all the old files if any

Of course, remember to make backups before doing that.

The best is to use a version control as GIT or SVN.

NgocDB
  • 131
  • 5
0

In my case size of the index.php file was zero. I copied the original file back and it worked.

However, no idea about what erased the content of index.php.

Onur Okyay
  • 190
  • 1
  • 10
0

My solution: Activating the plugin via System -> Config > Advanced > Advanced

TonkBerlin
  • 191
  • 1
  • 6
0

Sometimes this happens because symlinks are not allowed in template settings: Advanced > Developer > Template Settings > Allow Symlinks

Roman Snitko
  • 3,655
  • 24
  • 29