If you’re getting a blank page when trying to browse to a certain page on your store, or after clicking to have it do something, you’ve almost certainly got a PHP error in one or more of your files.
Blank pages can be caused by a number of things, and often occur just after installing, upgrading, or customizing your store. Any time you touch a PHP file, you must be sure to not introduce syntax problems(even worse you have a blank space after a “?>” at the end of one of your files), and you need to be sure that it uploaded correctly.
Sometimes FTP programs experience a timeout when uploading large quantities of files (such as when installing or upgrading your site), or fail to fully upload some files, or leave them as just 0-bytes in size. Some programs like SmartFTP and CuteFTP are well-known to be problematic in this area. For Windows PCs, we recommend FileZilla as a free, fast, and reliable FTP program. On Mac, Transmit or CyberDuck are commonly acclaimed FTP tools.
A PHP syntax error will very often result in a blank screen.
a) Turn on debug logging to store errors to a log file
Install the Debug Error-Logging Utility
One way to identify what PHP errors are happening, especially if you have no access to server errorlogs, is to use the Debug Error-Logging Tool from our downloads area. It’s a simple install, and can expose the source of your problems fairly quickly. Click {here} to download it.
If you’re dealing with blank admin pages, for the upload destination, substitute the /admin/includes/extra_configures folder instead of /includes/extra_configures where mentioned in the instructions.
Then see the “Dealing with Error Messages” section, below …
b) Attempt to show errors on-screen.
While the method above is far more reliable and preferable (since messages are never shown to customers), Another way to help identify *where* an error is happening is to show the errors on your browser. The drawback to this is that your customers can also see the errors, and search engines might catch them too … which could be embarrassing.
To attempt to show PHP debug errors on-screen, create and upload a new file, like this:
Filename: /includes/local/configure.php
<?php
define(’STRICT_ERROR_REPORTING’, true);
?>
Then try to access your site again. You may see many warning messages on the screen.
Dealing with the Error Messages
The “fatal” messages are the more important ones to deal with. “Notice” messages can be ignored in most cases. “Warnings” should draw some attention, but are not fatal.
Also note that many error/warning messages will be a result of previous error/warning messages.
Deal with them in the order they appear, and don’t blame the later errors until the earlier ones are dealt with first.
The most common customization errors include:
using ‘ or ” marks inside define() statements, resulting in mismatched quotes
removing or adding punctuation to define() statements, thus breaking the correct syntax. A define() statement should look like this: define(’CONSTANT_NAME’, ‘value here’);
missing semi-colons and periods, unbalanced parentheses, braces, brackets
uploading files to the wrong places.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
One Response
Hobosic
July 28th, 2009 at 5:45 am
1Hello,
template.jujuber.com to GoogleReader!
Hobosic
RSS feed for comments on this post · TrackBack URI
Leave a reply