Results 1 to 6 of 6

Hybrid View

  1. #1

    Default Error Message when trying to access admin site

    Hi,

    Can someone help me solve this error message real quick please. I get it when I try to access the admin site for my store. It just appeared for no reason that I can think of.

    I've looked at the line in the file shown and it is blank.

    Thanking you in advance:

    Fatal error: Cannot redeclare date_diff() in /home/fir58779/public_html/cart/frg97425673/includes/functions/general.php on line 2998

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Error Message when trying to access admin site

    Please provide the information in posting tips at the top when you reply
    Zen-Venom Get Bitten

  3. #3

    Default Re: Error Message when trying to access admin site

    Helpful - not!

    If you're asking for my zc version I can't tell you that. I could if I could access admin but I can't. That's why I asked if someone could help me access admin!

    If you're after other info please specify.

    Thanks anyway.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,872
    Plugin Contributions
    96

    Default Re: Error Message when trying to access admin site

    You're running Zen Cart v1.3.8a (the last version where the general.php module contained a date_diff function) on a PHP version at or above 5.3 (where the date_diff function was introduced).

    There are a couple of files that can be edited so that you can continue to limp along while you're planning your upgrade to Zen Cart v1.5.4:

    1. Edit your admin's (and be sure to rename your admin folder) /includes/functions/general.php, finding:
    Code:
      function date_diff($date1, $date2) {
    and changing that to
    Code:
      function zen_date_diff($date1, $date2) {
    2. Edit /YOUR_ADMIN/includes/header.php, finding:
    Code:
          $zc_days_to_expire = date_diff($zc_current_date, $zc_welcome_check->fields['coupon_expire_date']);
    and changing that to
    Code:
          $zc_days_to_expire = zen_date_diff($zc_current_date, $zc_welcome_check->fields['coupon_expire_date']);
    3. Edit /YOUR_ADMIN/includes/modules/orders_download, finding 2 occurrences (1 within a commented line) of date_diff and changing both to zen_date_diff.

    4. Edit /YOUR_ADMIN/orders.php, finding 2 occurrences of date_diff and changing both to zen_date_diff.

  5. #5

    Default Re: Error Message when trying to access admin site

    Hi,

    Thank you so much for replying to my post. As you had worked out, I somehow posted this question twice. I did it the first time and when I logged in to check, I could not find where I could access any previous posts I had made so I could see if there were any replies. After posting the question for a second time I found the best way was to search for my user name.

    Anyhow,

    I'll try to work my way through your suggestion and see how I go. I'm not a programmer and this constantly having to fix ZenCart php files that go wrong is really quite a challenge. Not too stable is it!

    I know what has happened here. I had to upgrade my host site so I could use new site software I have purchased and it would only run on a site with higher PHP version than my old site. Now I have upgraded, the new stuff works and the old Zen does not. Nothing is ever simple is it.

    Anyway, I really appreciate your help. Thanks

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,872
    Plugin Contributions
    96

    Default Re: Error Message when trying to access admin site

    The reason that you have to edit those PHP files is not due to instability, but due to the now-ancient version (1.3.8a) of Zen Cart that your store is currently using. The most recent version of Zen Cart (v1.5.4) has been verified to operate with PHP versions up to 5.6; when Zen Cart v1.3.8a was released in 2007, PHP 5.3 was still being developed (released in June of 2009).

 

 

Similar Threads

  1. Session_start error message when trying to access Admin panel - help please!!
    By campbdy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 May 2008, 08:24 PM
  2. New installation error message trying to access admin section
    By flipfloptreasures in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 25 Apr 2008, 04:51 AM
  3. Replies: 2
    Last Post: 31 Jul 2007, 02:40 AM
  4. Error message when trying to access store admin login page
    By wagster in forum Upgrading from 1.3.x to 1.3.9
    Replies: 7
    Last Post: 8 Feb 2007, 05:33 AM
  5. Error Message when trying to access Admin area
    By Magician742 in forum Basic Configuration
    Replies: 2
    Last Post: 10 May 2006, 09:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg