问题
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
回答1:
This is how I got it corrected(Hope will help you guys):
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); }
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)
- I deleted the testimonial.xml file in my app/etc/modules/testimoanial.xml.
- delete “maintenance.flag" file.
回答2:
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.
回答3:
Same problem, I have just purged cache
rm -rf var/cache/*
Et voila ! I don't understand what it was...
回答4:
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.
回答5:
This could be as simple as a template conflict. Revert to default template in System/Configuration/Design/Themes.
回答6:
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
回答7:
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.
回答8:
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!!!!!!!!!!!!!
回答9:
I had the same problem, it was solved after re-installing my Theme
回答10:
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.
回答11:
Just ran into this issue and lost the whole day solving it. Try to increase memory_limit
, that worked for me!
回答12:
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.
回答13:
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.
回答14:
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.
回答15:
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.
回答16:
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.
回答17:
My solution: Activating the plugin via System -> Config > Advanced > Advanced
回答18:
Sometimes this happens because symlinks are not allowed in template settings:
Advanced > Developer > Template Settings > Allow Symlinks
来源:https://stackoverflow.com/questions/4784117/magento-how-to-debug-blank-white-screen