Results 1 to 10 of 10
  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default error: cannot redeclare zen_parse_url()

    I was working on fixing a file in admin when all of a sudden I started getting this error message when trying to access orders:

    [21-Mar-2015 11:34:05 America/Los_Angeles] PHP Fatal error: Cannot redeclare zen_parse_url() (previously declared in /home/user/public_html/admin/includes/application_top.php:160) in /home/user/public_html/admin/includes/application_top.php on line 186

    Yes, it was orders I was editing but I uploaded a clean copy of the 1.5.4 orders file and it's still happening. I changed nothing else on the site immediately prior this error.

    Since the only place I know of zen_parse_url is in the configuration file, this makes no sense whatsoever.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: error: cannot redeclare zen_parse_url()

    So seeing as the error appeared when accessing orders, what has changed since the last time orders were accessed (not just immediately before)? What other plugins are installed? Is this prohibiting use of or access to the admin page now? If not, may want to see where/how else zen_parse_url or the file that contains that function is called... It may be that a store side file was uploaded to an admin side location for example...

    Were trying to resolve a different admin issue, so what was that issue and what was done to attempt to resolve it?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: error: cannot redeclare zen_parse_url()

    I had overwritten the orders file that had the edit orders mod in it - very little code changes. So after getting that code back up, then found the edit_order.php was throwing an unexpected error. So I was just checking everything all over again when this error started happening with the orders.php. I'm quite sure I made no changes when this started. What I did do was upload the default orders.php file for 1.5.4 but the error is still happening no matter which orders.php I use. I have found no other pages in admin with any errors. Haven't checked everything but spot checked.

    There are various mods but none that require edited core files in the admin beyond the edit orders and all are standard mods - but as I said I had not uploaded any new or changed files beyond the orders.php file. I have looked at dates and times on the admin files. I'm quite this was not in a reaction to something I did.

    Which means what? I don't know.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: error: cannot redeclare zen_parse_url()

    After a break and cup of tea, I'd double check the file "/admin/includes/application_top.php". I would "guess" it differs from a stock Zen Cart 1.5.4 copy or the upload may be corrupted.

    Out of curiousity, what is the version of PHP? Does your host have APC, Xcache, OPcache, or another PHP optimizer / accelerator enabled? Any sort of load balancer, proxy, or cache at the hosting provider?
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  5. #5
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: error: cannot redeclare zen_parse_url()

    nope, that was one of the files upgraded.

    Remember this did no start happening until 2 days after the upgrade.

    PHP is 5.4.3 with nothing that looks odd to me. More stuff than some hosts but nothing like what you are referring to.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: error: cannot redeclare zen_parse_url()

    Next "guess" would be "/admin/orders.php" (or the admin page in question) may be calling "/admin/includes/application_top.php" twice.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  7. #7
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: error: cannot redeclare zen_parse_url()

    It happens even with the default orders file.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: error: cannot redeclare zen_parse_url()

    Sounds like it's time for a complete compare of all files against originals: http://www.zen-cart.com/wiki/index.p...Obscure_Issues
    (And checking for "extra" unexpected files, such as backups you made but kept the .php on the end mistakenly)
    .
    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.

  9. #9
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: error: cannot redeclare zen_parse_url()

    Was thinking I might just go upload all the 1.5.4 files again in admin. Definitely got to do something major! Thanks.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  10. #10
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: error: cannot redeclare zen_parse_url()

    Well, I guess this one shall remain a mystery. I took his original admin files and upgraded again, adding in the one extra mod and all is okay there. I hate it when I can't figure out what went wrong.

    Thanks everyone!
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

 

 

Similar Threads

  1. v155 Error: Cannot redeclare zen_set_featured_status()
    By frank18 in forum General Questions
    Replies: 12
    Last Post: 24 Jun 2016, 05:31 AM
  2. 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
  3. 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
  4. 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

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