Php Fatal Error Cannot Redeclare Class Pear_config
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring fatal error cannot redeclare class php developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask cannot redeclare class laravel Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join cannot redeclare class codeigniter them; it only takes a minute: Sign up PHP Fatal error: Cannot redeclare class up vote 121 down vote favorite 11 Does anyone know what can cause this problem? PHP Fatal error: Cannot redeclare class php share|improve this question
Fatal Error Cannot Redeclare Class Wordpress
edited Jan 30 '14 at 5:34 rm-vanda 2,46621330 asked Apr 2 '09 at 3:11 SkyWeng 11.8k53112146 11 This can append with APC + autload see stackoverflow.com/questions/4575341/… –gagarine Mar 4 '12 at 17:04 3 Use autoload, or you can also try if(!class_exists('YourClass')){ include 'YourClass.php'; } –Timo Huovinen Sep 18 '12 at 17:28 add a comment| 18 Answers 18 active oldest votes up vote 98 down vote accepted It means you've already created a class. For instance: class Foo cannot redeclare class laravel migration {} // some code here class Foo {} That second Foo would throw the error. share|improve this answer answered Apr 2 '09 at 3:15 whichdan 1,6061210 55 This answer is not as helpful as AaronLS's. I don't think the questioner would have asked the question if (s)he had written an obvious repetition like this (even in quite a complex situation). The include_once tip helps to clarify an obscure feature of PHP. –DavidHyogo Mar 20 '13 at 2:12 2 This error might also occur if you define the __construct method more than once. –Jack Trowbridge Sep 1 '13 at 21:27 1 AaronLS's answer is perfect.. –Krunal Panchal Feb 19 '14 at 4:13 3 Just use include_once('FooBar.php') to include your class. The name of the function is self-explanatory. –Marco Matarazzi Feb 19 '14 at 13:49 1 AaronLS's answer is much higher rated, and you can find it way down here. –qris Oct 7 '14 at 11:48 | show 2 more comments up vote 266 down vote You have a class of the same name declared more than once. Maybe via multiple includes. When including other files you need to use something like include_once "something.php"; to prevent multiple inclusions. It's very easy for this to happen, though not always obvious, since you could have a long chain of files being included by one another. share|improve this answer answered Apr 2 '09 at
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the php fatal error cannot redeclare class laravel workings and policies of this site About Us Learn more about Stack
Php Fatal Error Cannot Redeclare Function
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Cannot Redeclare Class Database Php
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join http://stackoverflow.com/questions/708140/php-fatal-error-cannot-redeclare-class them; it only takes a minute: Sign up PHP - Fatal error: Cannot redeclare class Config in /path/to/Config.php on line 44 up vote 1 down vote favorite This is a WordPress local installation that I am trying to work with. I have not written a single line of this code myself. I don't understand what this error means: Fatal http://stackoverflow.com/questions/19768131/php-fatal-error-cannot-redeclare-class-config-in-path-to-config-php-on-line error: Cannot redeclare class Config in /Applications/XAMPP/xamppfiles/lib/php/Config.php on line 44 Line 44 reads as follows: class Config { My guess is that a Config class has either already been declared elsewhere, or that this file is being executed for the second time. php wordpress share|improve this question edited Jun 25 '14 at 14:17 JakeGould 16.8k62952 asked Nov 4 '13 at 12:54 Jon Crowell 3,53184888 2 Find the relevant include/require and change it to include_once/require_once resp. –geomagas Nov 4 '13 at 12:57 I have searched throughout the entire codebase and include_once and require_once are always used. –Jon Crowell Nov 4 '13 at 20:47 Then, the same class is defined twice in the same or, more probably, in different files. This could be a conflict between plugins and/or the active theme. Deactivate all plugins and re-activate them one by one in order to resolve the conflict. –geomagas Nov 4 '13 at 21:31 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted That usually happens when y
dutch | french | german | greek | italian | japanese | korean | portuguese | russian | spanish Chris Karakas Online Forum Index -> PHP-Nuke Forum http://www.karakas-online.de/forum/viewtopic.php?t=10468 All Topics Share this page:These icons link to social bookmarking sites where readers can share and discover new web pages. View previous topic :: View next topic Author Message dayv2005PrivateJoined: 21 Jan 2008Posts: 4 Posted: Mon Jan 21, 2008 4:31 pm Post subject: Cannot redeclare class Config - while trying to view Forums Hi new to this forum. But i am having an issue cannot redeclare with the forum module in phpnuke. I Just got done installing phpnuke 8.0 and i logged in as an admin and a super user and i activated the forums module. With a regular user i click on forums link it takes to to a page and says there are no messages yet or something like that. But then when im an admin or super user i cannot redeclare class click on the forum module in the admin panel and it takes me to a cannot display page? Is there something else i need to do? Do i need to install phpbb seperatly? If so how? and do i needsome script for this that i seen others talking a little about o othe sites? Back to top FlorenPresidentJoined: 08 Mar 2006Posts: 1384Location: USA Posted: Tue Jan 22, 2008 2:21 am Post subject: When you get error messages, you need to be specific; otherwise people may not be able to help you. You need to post the exact error message, and not "...or something like that. " (Of course, you would x out any specific user info about your site.) Did you set your site url in preferences? Did you set the Admin, Forums, Configuration settings, including script and cookie path Also search this site for "forums blank" without the quotes. Back to top dayv2005PrivateJoined: 21 Jan 2008Posts: 4 Posted: Wed Jan 23, 2008 2:01 pm Post subject: Floren wrote: When you get error messages, you need to be specific; otherwise people may not be able to help you. You need to post the exact er