Zen Cart Logo
Forums / General Questions / blank store page error

blank store page error

Views: 565

Results 1 to 5 of 5
10 Jan 2013, 4:48 PM
#1
dennio6 avatar

dennio6

New Zenner

Join Date:
Jan 2013
Posts:
3
Plugin Contributions:
0

blank store page error

I installed version1.5.1 yesterday and started customizing my store. Everything was going well and I felt that I was about half done when I could no longer log into the admin area to finish the job.

I discovered that I had uploaded the english.php file to the wrong locations. I learned that there is an english.php file in the admin section and the catalog section. I found an original version of the fill and reloaded it to the admin section. After doing that, I was able to log into admin. BUT

Now my store no longer loads. I have gone into cache and gotten the DEBUG for the problem and it is saying:
PHP Fatal error: Cannot redeclare zen_date_raw() (previously declared in /home/content/52/8775952/html/dennio/store/includes/languages/custom/english.php:30) in /home/content/52/8775952/html/dennio/store/includes/languages/english.php on line 39

Also, the time stamp on the server is now messed up and not registering the correct time. I have a days work in my customization project and I am hoping to avoid a complete re-install and starting from scratch.

My store may be found at https://www.dennio.com/store. I see nothing when I go there, now. Internet Explorer says HTTP500 Internal Server Error. Firefox does not display anything.

Can anyone tell me how to fix this issue?
Thanks in advance

10 Jan 2013, 5:01 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: blank store page error

dennio6:

PHP Fatal error: Cannot redeclare zen_date_raw() (previously declared in /home/content/52/8775952/html/dennio/store/includes/languages/custom/english.php:30) in /home/content/52/8775952/html/dennio/store/includes/languages/english.php on line 39

includes/languages/custom/english.php

includes/languages/english.php

BOTH the above files should be composed as below. Find the relevant section (almost at the top of the file) and make sure it reads:-

  @setlocale(LC_TIME, 'en_US');
  define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
  define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
  define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
  define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

////
// Return date in raw format
// $date should be in format mm/dd/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
  if (!function_exists('zen_date_raw')) {
    function zen_date_raw($date, $reverse = false) {
      if ($reverse) {
        return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
      } else {
        return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
      }
    }
  }

Not sure WHY it is referencing BOTH in your error message. You may have fouled up some edit, or you have bought a cheap and nasty template...

10 Jan 2013, 5:09 PM
#3
dennio6 avatar

dennio6

New Zenner

Join Date:
Jan 2013
Posts:
3
Plugin Contributions:
0

Re: blank store page error

Thank you thank you thank you!!!

When I went back and replaced the english.php file in the admin folder, BUT I neglected to replace the files in the catalog section. Your reply sparked that idea that I needed to re-uploaded the original files to the catalog folder into the custom and languages folders.

THANKS again. Wish I had of posted this eight hours ago, before I started losing my hair. LOL

10 Jan 2013, 5:12 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: blank store page error

I keep a little notepad handy as I do things, and I write notes... Then, when the whole site falls over, I go back to my notes and unpick what I did. We ALL do silly things... it's how we learn.

10 Jan 2013, 5:18 PM
#5
dennio6 avatar

dennio6

New Zenner

Join Date:
Jan 2013
Posts:
3
Plugin Contributions:
0

Re: blank store page error

I will use your suggestion. I am a total newbie when it comes to programming. So I am sure that this will not be my last mistake. The epiphany was when I realized that there are two complete sections of the Zen Cart program... the admin and the catalog sections, which have a lot of the same file names. Won't make that mistake again. LOL

Thanks once again