Results 1 to 8 of 8
  1. #1
    Join Date
    May 2009
    Location
    WA
    Posts
    65
    Plugin Contributions
    0

    Default Fatal error: Cannot redeclare date_diff()

    Hi .

    I was just forced to upgrade by godaddy. I called and followed their instructions which mostly worked.
    Back up database
    uninstall old zencart
    Install new zencart 1.5
    Restore database

    My website looks fine so far I haven't tested ordering yet. But it all looks like it's there and working.

    Now when I try to access my admin folder I get this error
    Fatal error: Cannot redeclare date_diff() in /home/content/62/4426262/html/store/xxx/includes/functions/general.php on line 3001


    How can I fix this and get access to my admin folder again?


    Also when I installed 1.5 it gave me another admin folder which is empty and has nothing in it. Is it ok to delete this?

    Thank you in advance!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error: Cannot redeclare date_diff()

    Did you find those "instructions" posted on their site someplace?
    What was the name of the person who gave you those instructions?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2009
    Location
    WA
    Posts
    65
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot redeclare date_diff()

    Does it honestly matter at this point? I called in and was given those instructions by their support staff and I can't remember his name now.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error: Cannot redeclare date_diff()

    The advice you were given is extremely bad. And quite incomplete. If you do only what they said, you will lose all your customizations and your database will be out of date.

    I was hoping to know where exactly to tell GoDaddy management to find the source of the bad information so they can correct it, by pointing to www.zen-cart.com/upgrades instead.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error: Cannot redeclare date_diff()

    The reference to date_diff() tells me that you've got a file on your site that is trying to define that function. And since PHP 5 has that function built-in, you're not allowed to define it again. And, old versions of Zen Cart (v1.3.8a and lower) did define that function because it didn't work in the PHP versions that those versions of Zen Cart were built for.
    So, as of Zen Cart v1.3.9 (released in April 2010), that function definition was removed from Zen Cart, because it was also being designed to work on PHP 5.2.
    The fact that you're getting that error message tells me that you're still using v1.3.8 (or older) code ... which means you didn't remove all the old Zen Cart files.

    So, your recovery steps are still the same as any upgrade: www.zen-cart.com/upgrades
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    May 2009
    Location
    WA
    Posts
    65
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot redeclare date_diff()

    So now that my site is screwed, what is my next step?

    Ok thanks! DrByte.
    Last edited by gfdesigns; 26 Aug 2012 at 07:24 PM.

  7. #7
    Join Date
    May 2009
    Location
    WA
    Posts
    65
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot redeclare date_diff()

    Just a quick update my site was totally screwed. I had a friend work on it all sunday and couldn't get it to work correctly.
    So I switched hosts and told godaddy to bug off!
    Now I get to rebuild my site from scratch. good times.

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Fatal error: Cannot redeclare date_diff()

    Quote Originally Posted by gfdesigns View Post
    Just a quick update my site was totally screwed. I had a friend work on it all sunday and couldn't get it to work correctly.
    ...
    Now I get to rebuild my site from scratch. good times.
    Going forward you should NEVER upgrade your live site.. Following the recommended upgrade path in the official upgrade instructions you would create a copy of your site in a "staging/development" area NEVER on your live store. You would do your upgrade there and then and ONLY then once you have your changes/notes/updated files would you attempt to upgrade your live site..

    that said you could restore your old sit eon your new host so that you can do just this while keeping your live store going..

    Good luck with your upgrade efforts..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. v139a Compatibility issue: Fatal error: Cannot redeclare date_diff()
    By jgold723 in forum General Questions
    Replies: 7
    Last Post: 9 Feb 2014, 11:12 PM
  2. v151 Fatal error Cannot redeclare class
    By sasha21 in forum General Questions
    Replies: 5
    Last Post: 21 Jul 2013, 03:21 AM
  3. v151 Fatal error: Cannot redeclare zen_create_random_value()
    By IKZAGHET in forum General Questions
    Replies: 1
    Last Post: 17 Jan 2013, 07:43 PM
  4. Replies: 7
    Last Post: 3 Jun 2012, 04:37 PM
  5. Replies: 14
    Last Post: 4 May 2012, 10:30 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR