Fatal error: Cannot redeclare class JConfig in /mydomaindire

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
newguy08
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Apr 19, 2008 2:07 am

Fatal error: Cannot redeclare class JConfig in /mydomaindire

Postby newguy08 » Sat Apr 19, 2008 2:22 am

Hi Guys,

I am very new to Joomla but I love what I have tried so far. I was doing fine with it until I installed Joomlashack Releases Jamba - A Free Joomla 1.5 Template pack and now I don't see home page or my administrator page.

here what i get on the browser

Fatal error: Cannot redeclare class JConfig in /mydomaindirectory/jamoola/configuration.php on line 2

my configuration.php looks like this.

<?php
class JConfig {
/* Site Settings */
var $offline = '0';
var $offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
var $sitename = 'Somename';
var $editor = 'tinymce';
var $list_limit = '20';
var $legacy = '0';
/* Debug Settings */
var $debug = '0';
var $debug_lang = '0';
/* Database Settings */
var $dbtype = 'mysql';
var $host = 'mysqlserver';
var $user = 'adminid';
var $password = 'adminpass';
var $db = 'jdb;
var $dbprefix = 'jos_';
/* Server Settings */
var $live_site = '';
var $secret = 'jcjFPsKprKjIMisY';
var $gzip = '0';
var $error_reporting = '-1';
var $helpurl = 'http://help.joomla.org';
var $xmlrpc_server = '0';
var $ftp_host = 'some ftp server';
var $ftp_port = '21';
var $ftp_user = 'someame';
var $ftp_pass = 'somepassword;
var $ftp_root = '/mydomaindirectory/jamoola';
var $ftp_enable = '1';
/* Locale Settings */
var $offset = '0';
var $offset_user = '0';
/* Mail Settings */
var $mailer = 'mail';
var $mailfrom = 'mymail@gmail.com';
var $fromname = 'SomeName;
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost';
/* Cache Settings */
var $caching = '0';
var $cachetime = '15';
var $cache_handler = 'file';
/* Meta Settings */
var $MetaDesc = 'Joomla! - the dynamic portal engine and content management system';
var $MetaKeys = 'joomla, Joomla';
var $MetaTitle = '1';
var $MetaAuthor = '1';
/* SEO Settings */
var $sef = '0';
var $sef_rewrite = '0';
var $sef_suffix = '0';
/* Feed Settings */
var $feed_limit = 10;
var $log_path = '/mydomaindirectory/jamoola/logs';
var $tmp_path = '/mydomaindirectory/jamoola/tmp';
/* Session Setting */
var $lifetime = '15';
var $session_handler = 'database';
}
?>

Please help me out.. I was very excited to work on a project this weekend and then messed-up with Quicklaunch install. :(

Thanks guys!

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14713
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Fatal error: Cannot redeclare class JConfig in /mydomaindire

Postby humvee » Sat Apr 19, 2008 8:25 am

Hi

you need to disable/uninstall the Template and reassign as default one of the stock Joomla! templates.

Steps:

As you cannot access Admin you need to edit the database to reset the Template.
This process assumes you have not removed the default template rhuk_milkyway
Using PHPMyAdmin open the database.
Find the table jos_templates_menu
There should be two entries: your template pack short name should be in the first with menuid '0' and clientid '0'
the second should show 'khepri' menuid '0' and clientid '1'
Click on the pencil edit icon alongside your template pack record
in the name field enter: rhuk_milkyway
Click Go to save the item.
Try accessing the site and admin Back-end

Assuming access is ok go to Installation Manager and delete the Template Pack. If you want to still use this if possible check the Joomlashack site or indeed the original pack itself for further instructions.

hth
Andy

surfer74
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Aug 19, 2009 6:18 pm

Re: Fatal error: Cannot redeclare class JConfig in /mydomaindire

Postby surfer74 » Wed Aug 19, 2009 6:22 pm

have this problem too.

But I see the Admin-Area. What I must do? Delete all Templates from the server? Or a new fresh installation?

Riverside
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 213
Joined: Mon Nov 05, 2007 8:54 pm

Re: Fatal error: Cannot redeclare class JConfig in /mydomain

Postby Riverside » Mon Nov 15, 2010 5:58 am

Wow! This is old. I don't know what all the above instructions were supposed to do, but they did nothing to fix this problem. One really simple thing did though!

Clear the site's cookies from your browser!

Solved the problem for me!

EDIT: I should probably add that I had made some recent changes to a menu on the site, and had done some weird stuff with it. I did have to undo all of that in the back end, and find and delete some entries from sql FIRST, then cleared the cookies.

If you were just making changes to anything on the site just before you saw this error, I recommend going into your database and searching for the term of whatever you were working with. If an entry shows up in jos_session, chances are you will have to clear your browser cookies AFTER you get rid of any entries related to the change within the database. I.E. if you were working on menus, check menu entries that match.

You may not have to do anything in the database if everything clears in the admin panel. I had to because one entry would not delete there. phpMyAdmin was the only way to get rid of it, but the cookie calling for it still needed to be cleared out before anything would work on my end.

Hope this helps. :D
Don't let the number of stars fool ya! I spend most of my time in the "real world" working with and troubleshooting Joomla and the many extensions for it.

dirnor
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Feb 16, 2011 7:41 am

Re: Fatal error: Cannot redeclare class JConfig in /mydomain

Postby dirnor » Wed Feb 16, 2011 8:12 am

humvee wrote:Hi

you need to disable/uninstall the Template and reassign as default one of the stock Joomla! templates.

Steps:

As you cannot access Admin you need to edit the database to reset the Template.
This process assumes you have not removed the default template rhuk_milkyway
Using PHPMyAdmin open the database.
Find the table jos_templates_menu
There should be two entries: your template pack short name should be in the first with menuid '0' and clientid '0'
the second should show 'khepri' menuid '0' and clientid '1'
Click on the pencil edit icon alongside your template pack record
in the name field enter: rhuk_milkyway
Click Go to save the item.
Try accessing the site and admin Back-end

Assuming access is ok go to Installation Manager and delete the Template Pack. If you want to still use this if possible check the Joomlashack site or indeed the original pack itself for further instructions.

hth
Andy



I'd follow your given step, but it's not working...please, very dispress :( :( :(

Neebs
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Jun 06, 2011 2:00 pm

Re: Fatal error: Cannot redeclare class JConfig in /mydomain

Postby Neebs » Mon Jun 06, 2011 2:44 pm

Hey there,

I've encountered this problem today too...

The story is this...

The site I'm maintaining was originally created a few years back (not by me). I'm not sure if the relevant updates have been done since then. Last week there was a transfer of servers that the site was hosted on and so I had to migrate the site to new host space.
I installed Joomla on the new host space, created the relevant database and imported the previous 'dumps' tables into the new database (the configuration file does reference the correct DB details!).

Then, following a topic posted here:

viewtopic.php?t=187461

Step 4. Completing the Move...

You now have to 'OVERWRITE' all of the essential Joomla! folders that site on the new site with the folders from the old site - this will add all of the stuff you've customized like Components & Modules you've installed, Templates and files you've edited, etc...
These are the ESSENTIAL FOLDERS to Copy over (and OVERWRITE)
administrator
components
editor
help
images
includes
language
mambots
media
modules
templates

I uploaded (Overwrite) these Essential Folders from the site back-up files and when I tested the site, I got an error message referencing the 'globals.php' file was missing from my directory. (Which it was) so I uploaded the back-up 'globals.php' file in my root directory.

It then returned the 'Cannot redeclare class JConfig in/mydomaindire' fatal error message...

Any help would be really appreciated!

Thank you,

Neebs
neebs

skai
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Aug 02, 2011 12:14 pm

Re: Fatal error: Cannot redeclare class JConfig in /mydomain

Postby skai » Tue Aug 02, 2011 12:38 pm

I had the same difficulty.

For me it helped to unpublish a plugin and reduce the use of modules. I changed the applicability of the modules related to the one mentioned in the error message in the module manager by assigning them to just a few menus (and not to all as before).

I had two (or more) instances using the same name for a CSS class, both running at the same time, which caused this conflict. Maybe some renaming of the CSS file and some coding in the PHP files (keyword: require_once) would have helped too, but this was too complicated for me comparing to resetting the use of the related modules and plugins.

Maybe this helps you too. :)

sentientred
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 18, 2011 8:57 am

Re: Fatal error: Cannot redeclare class JConfig in /mydomain

Postby sentientred » Sun Dec 15, 2013 8:17 pm

I too had this error. I had uploaded Joomla! over itself to fix something else.

This worked for Joomla! 2.5.16.

I downloaded and opened the configuration.php file and noticed there were doubles of the following lines:

Code: Select all

public $display_offline_message = '1';
public $offline_image = '';
public $captcha = '0';

I deleted these duplicates and reuploaded the file. This restored access to the backend for me.


Return to “Templates for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 5 guests