Zen Cart Logo
Forums / All Other Contributions/Addons / GV Admin Edit - Fatal error: Cannot redeclare class base

GV Admin Edit - Fatal error: Cannot redeclare class base

Locked

Views: 2,052

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
25 Jun 2008, 1:29 PM
#1
bbdmagic avatar

bbdmagic

New Zenner

Join Date:
Jun 2008
Posts:
3
Plugin Contributions:
0

GV Admin Edit - Fatal error: Cannot redeclare class base

( I think I am posting this in the right area, apologies if it is wrong!)
Hi everyone, I installed the GV Admin Edit 1-1, as per the instructions included in the .Zip. Now when I try to log into my admin, I get:

Fatal error: Cannot redeclare class base in /home/******/public_html/includes/classes/class.base.php on line 17

I have looked in that file and found this ; (I have marked line 17 with "^^^^^")

<?php /** * File contains just the base class * * @package classes * @copyright Copyright 2003-2005 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: class.base.php 3041 2006-02-15 21:56:45Z wilt $ */ /** * abstract class base * * any class that wants to notify or listen for events must extend this base class * * @package classes */ **^^^^^class base {** /** * array to hold the list of observer classes * @var array */ var $observers = array(); /** * method used to an attach an observer to the notifier object * * NB. We have to get a little sneaky here to stop session based classes adding events ad infinitum * To do this we first concatenate the class name with the event id, as a class is only ever going to attach to an * event id once, this provides a unigue key. To ensure there are no naming problems with the array key, we md5 the unique * name to provide a unique hashed key. * * @param object Reference to the observer class * @param array An array of eventId's to observe */ I have tried reinstalling the admin folders from a fresh download of Zen, and am still getting this error. Now I dont know whats going on here, im new to this. And I thought things were going so well. Can somebody please point me in the right direction to finding a fix for this? I have looked around the forums with the search function, but the closest thing I found to this problem is from Graham22; > Sorry, i meant the same error as "Cannot redeclare class base in C:\Program Files\EasyPHP\www\zencart\includes\classes\class.b ase.php" > > I have now resolved the issue (it was quite obvious actually). > > I was using admin/includes/application_top.php in my file, then using "require" on another file also using this application_top.php. As a result the class was being declared twice within a single document. > > I simply removed the require('admin/includes/application_top.php') from the second file and everything was fine. This is probably what i have to do, but I have no idea where to look for or how to find the files in question. As far as I am aware the functionality from a custoemrs point of view is hunkey dorey, though if it might help anyone help me my site is <http://www.bbdmagic.net> A little help please someone? thanks
25 Jun 2008, 7:01 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: GV Admin Edit - Fatal error: Cannot redeclare class base

Is it possible you've copied files to the wrong locations?

You may need to download a full copy of your PHP files from your server via FTP. Then compare those files against a freshly-unzipped copy of Zen Cart, using a tool like WinMerge.
That way you can identify which files are different, and which files are "extra" and thus might be causing the problem.

You can probably safely start just with the "admin" folder and subfolders, instead of the entire site, in this case.

Related FAQ: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

25 Jun 2008, 7:08 PM
#3
bbdmagic avatar

bbdmagic

New Zenner

Join Date:
Jun 2008
Posts:
3
Plugin Contributions:
0

Re: GV Admin Edit - Fatal error: Cannot redeclare class base

Thank you for your reply.

I did compare the two side by side, and everything looked ok, so I just backed up my database and applied it to a fresh install of Zen. Just need to make some adjustments again and it'll be all sorted.

Thanks again for the reply.