Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2010
    Posts
    362
    Plugin Contributions
    0

    Default Compatibility issue: Fatal error: Cannot redeclare date_diff()

    We just moved our 1.3.9a installation to a new host which is running php 5.4.

    The front end of the site seems to work fine, but when I try to login, I'm see an error:

    Fatal error: Cannot redeclare date_diff()

    Which the FAQ tells me means the version I'm running is too old. Correct?

    Questions:

    1) Is there a temporary work around to fix this (since the front end seems to be working fine)?

    2) If I have to upgrade, how far up do I have to go to be compatible with php 5.4? I'd rather not go to the 1.5 series now because of the work involved.

    Thanks,

    John

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

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    Quote Originally Posted by jgold723 View Post

    2) If I have to upgrade, how far up do I have to go to be compatible with php 5.4? I'd rather not go to the 1.5 series now because of the work involved.

    Thanks,

    John
    Trying to do a "partial upgrade" is like putting a bandaid on a bullet wound.. It's ineffective, not recommended, and will likely cause more problems than the one you are trying to solve..
    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.

  3. #3
    Join Date
    Dec 2010
    Posts
    362
    Plugin Contributions
    0

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    I understand that, but it's Sunday, the site has been down since Friday, the client wants it up by Monday and I really don't want to work for 24 hours straight to do the upgrade (Kinda like trying to swap engines in the middle of the Indy 500).

    So if there's a quick patch that will resolve this problem and buy us a few weeks of time to do the upgrade properly, that's great.

    If it's impossible (or more work than the upgrade), then hey, we'll deal with that. I'd just like to know what my options are.

    Thanks,

    John

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    In addition to Diva's comment, here's a link to help with your #2 question.

    http://www.zen-cart.com/content.php?...o-run-zen-cart

    ie: there is no currently released version that is php 5.4 compatable without patches.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,489
    Plugin Contributions
    88

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    Quote Originally Posted by jgold723 View Post
    We just moved our 1.3.9a installation to a new host which is running php 5.4.

    The front end of the site seems to work fine, but when I try to login, I'm see an error:

    Fatal error: Cannot redeclare date_diff()
    Use your admin's Tools->Developers Tool Kit and search for either function date_diff or just date_diff to see where the redefinition is coming from. Or, for that matter, just look at the file that's being referenced by the debug-log record that's generated.

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

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    Quote Originally Posted by jgold723 View Post
    I understand that, but it's Sunday, the site has been down since Friday, the client wants it up by Monday and I really don't want to work for 24 hours straight to do the upgrade (Kinda like trying to swap engines in the middle of the Indy 500).
    Ahhhhh a racing analogy.. right up my alley..

    Racing teams (who have budgets to do so) from all sanctioning bodies do this ALL the time if a championship or points are on the line (NASCAR, Indy, NHRA, IHRA). Even in my husband's SPORTSMAN classes I've seen teams do overnight engine thrashes, and two years ago when racing my car, we did a TRANSMISSION SWAP between qualifying rounds..

    My point?? Sometimes you gotta do what you gotta do.. Many of us have been there and done that.. In a PINCH I upgraded a client overnight and I used the barebones template to give her site a nice clean look in the interim while I restored her old template and the rest of her add-ons in the new version of Zen Cart..
    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.

  7. #7
    Join Date
    Dec 2010
    Posts
    362
    Plugin Contributions
    0

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    Geeze, I have a hard enough time just replacing the headlight bulbs...

    True, and I supposed if I absolutely, positively had to do it, I would. But boy would I like to avoid having to look up at the clock and seeing 3 a.m. roll around. Turns out were were able to roll back php to 5.2 which solved that particular problem. I am recommending that my client upgrade their install though.

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

    Default Re: Compatibility issue: Fatal error: Cannot redeclare date_diff()

    Quote Originally Posted by jgold723 View Post
    Geeze, I have a hard enough time just replacing the headlight bulbs...
    HA!!! We did an engine thrash under an EZ-UP.. IN THE RAIN with only a few halogen shop lights to help us see what we were doing.. We had folks from competing cars helping with that effort... (manpower, tools, parts, food, etc) All to get ready for the final round of qualifying the next morning.. It was fun.. then they cancelled the race the next day because the weather didn't let up.. **lol**

    Quote Originally Posted by jgold723 View Post
    True, and I supposed if I absolutely, positively had to do it, I would. But boy would I like to avoid having to look up at the clock and seeing 3 a.m. roll around. Turns out were were able to roll back php to 5.2 which solved that particular problem. I am recommending that my client upgrade their install though.
    and THIS is the right answer.. Sounds like you are a Hostmonster client.. They are going through a MASSIVE PHP 5.4 upgrade..
    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. 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
  2. v150 Fatal error: Cannot redeclare date_diff()
    By gfdesigns in forum Upgrading to 1.5.x
    Replies: 7
    Last Post: 31 Aug 2012, 08:26 PM
  3. Replies: 7
    Last Post: 3 Jun 2012, 04:37 PM
  4. Replies: 14
    Last Post: 4 May 2012, 10:30 AM
  5. Fatal error: Cannot redeclare process_product_name
    By nishajh in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 1 Nov 2009, 08:44 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