Zen Cart Logo
Forums / General Questions / Blank page — index.php / Store not loading

Blank page — index.php / Store not loading

Locked

Views: 30,467

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
6 Jan 2010, 10:27 PM
#1
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Blank page — index.php / Store not loading

Wow, I've been using Zen Cart over a year with several clients. Now, today, I've encountered something new.

My store won't load at all. HELP!

I can access Admin. No problem. I can even type in a direct url for an image and it works. I used an FTP client to see if I deleted something, but it all SEEMS to be there.

When I type in the URL for my store homepage (ie. https://www.mystore.com/Order/index.php) is appears to 'load', but loads blank. When I view the source code from my web browser for that index page, it's blank, too! I'm stumped and panicked.

I just got off the phone with my hosting company. We rebooted the server and everything seems good there.

The only thing I was working on today was customizing email templates. Nothing else. I can't see how that's connected, but felt obligated to share. I can't help but think the problem is me somehow.

For whatever reason, the store homepage and other product pages won't load. I'm getting completely blank pages. I have no idea where to turn. Any advice? Anyone? Anyone?

Failing anyone's tips and advice, does anyone know if it's a problem to simply re-upload my site (excluding the admin folder)?

7 Jan 2010, 1:08 AM
#3
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Blank page — index.php / Store not loading

Thank you so much for that debugging tool! Wow, I love the Zen-Cart community! The information and support is phenomenal!

The debugging tool you mentioned pointed me to the directory, the file and even the line number where the code problem resided and I'm back up and making money!

In an effort to help others who might search this forum with a similar problem, I just want to expand on what happened so it may educate and help others:


Site Down, Blank Pages, Not Loading, Not Showing, index.php
What I Learned and How to Fix It

My site went down today and my index.php page wouldn't load. I should say, it did load, but was completely blank. After using the debugging tool mentioned above, it pointed me to languages/english.php file. It not only pointed me to the file, but said line 16 had bad syntax.

Why? Why would my whole site not function because one line of code about email footer stuff? The answer: the syntax on english.php is critical. If you miss a quote, an apostrophe, or forget to concatenate those "define" variables with the little "." such as something like: ```
define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' .....


So, while I thought I was tinkering on something safe (email template design), I had no idea I had the potential to break the entire site by making an error on english.php.

**What did I learn that may help you?**
1) Think like a computer. In most cases, like mine, if you're having a sudden problem, ask yourself what were you working on before it broke? It doesn't matter how illogical it seems to you, your culprit may very well be the one tiny thing nestled in that far off file somewhere you were just working on.

2) Use the debugger tool. It will point you to the directory, the file, and the line number where the problem resides. If you're like me, you're not afraid of PHP, but you may not be a skilled programmer, so tools like that one are invaluable!

3) Keep backups of everything. After installing your site, I recommend you keep a copy of the uploaded site (before you've done anything with it) on your local computer. This helped me compare my live languages/english.php to the original virgin Zen-Cart file and isolate the syntax problem.

I hope this helps someone else who may be going through the same issue!

Thank you!