Fatal Error Cannot Redeclare Class 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 fatal error cannot redeclare class php about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users cannot redeclare class laravel Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping
Cannot Redeclare Class Codeigniter
each other. Join 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
Fatal Error Cannot Redeclare Class Wordpress
trying to work with. I have not written a single line of this code myself. I don't understand what this error means: Fatal 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 cannot redeclare class laravel migration 16.7k62851 asked Nov 4 '13 at 12:54 Jon Crowell 3,49684887 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 you declare a class more than once in a page -- maybe via multiple includes. To avoid this, use require_once instead. If you use require_once PHP will check if the file has already been included, and if so, not include (require) it again. Say, for example, you have the following code:
error: Cannot redeclare class Config in /Applications/XAMPP/xamppfiles/lib/php/Config.php on line
Php Fatal Error Cannot Redeclare Class Laravel
44 When i install OwnCloud manually, I get the php fatal error cannot redeclare function same error. Can anyone help me? Thanks in advance! cristian 2014-08-05 02:16:19 UTC #2 fatal error: cannot redeclare class magento Hi @heymansstef and update to this post. We could reproduce the error. We are going to investigate how to fix it and we http://stackoverflow.com/questions/19768131/php-fatal-error-cannot-redeclare-class-config-in-path-to-config-php-on-line will update this post once we have a workaround/fix for it. beltran 2014-08-19 16:45:38 UTC #3 Hi, we could reproduce the issue. Try the following workaround to fix this issue in XAMPP itself and we will check if it is possible to fix if in https://community.bitnami.com/t/error-after-install-fatal-error-cannot-redeclare-class-config/25114 new XAMPP versions. /Applications/XAMPP/xamppfiles/etc/php.ini And replace: ;include_path = ".:/php/includes" with include_path = ".:/php/includes" Then restart Apache server and reinstall the ownCloud module. I hope it helps. beltran 2014-08-20 09:39:49 UTC #4 The issue is XAMPP ships the PEAR Config package that installs "php/lib/Config.php" file and ownCloud uses "config.php" file. As a workaround you can uninstall the PEAR package sudo xamppfiles/bin/pear uninstall Config and uninstall & install Bitnami ownCloud module. heymansstef 2014-08-20 15:10:12 UTC #5 Thanks beltran, the fix you first mentioned solved the problem. I replaced ;include_path = ".:/php/includes" with include_path = ".:/php/includes" and this solved the problem. Thanks a lot! Home Categories FAQ/Guidelines Terms of Service Privacy Policy Powered by Discourse, best viewed with JavaScript enabled Bitnami provides free all-in-one installers, virtual machines and cloud images for popular open source applications. Get them now!
to share my problem and solve. this occur when i try to test my php script. Then i saw this error message: "Cannot redeclare class Config in C:\xampp\php\PEAR\Config.php on line https://ibalcube.wordpress.com/2011/12/17/cannot-redeclare-class-config-in-cxamppphppearconfig-php-on-line-44/ 44". ok, before i tell you how to solve this, i am currently using PHP 5.3.8 and XAMPP 1.7.7. how to solve this problem, just follow these step: 1. open your php.ini 2. then find this string: include_path = ".;C:\xampp\php\PEAR" 3. add ";" at the beginning of the string. so, the final string should be ";include_path = ".;C:\xampp\php\PEAR"" 4. save your php.ini and restart your apache. 5. finish. cannot redeclare by the way, actually i am not sure the root of problem and i can not explain it. but maybe just because i also have a file that is named "config.php" and in some line of code and i include this file in some page. renaming config folder in PEAR folder would not help you. just follow my step and you will save your time just like me. cannot redeclare class if this article help you, please give some comment and say thank you. i am glad can share this to you. c u. Share this:ShareFacebookTwitterEmailLike this:Like Loading... PHP ← Office:Outlook can not connect to your outgoing (SMTP) e-mailserver… PHP:Datetime is not showing the correct local time inPHP → One response to “PHP:Cannot redeclare class Config in C:\xampp\php\PEAR\Config.php on line44” Rohit Reddy October 10, 2013 at 4:55 pm Yes it did help. The reasoning is actually right. Using the ; I guess prevents the PEAR from loading. Thank you! Reply Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. (LogOut/Change) You are commenting using your Twitter account. (LogOut/Change) You are commenting using your Facebook account. (LogOut/Change) You are commenting using your Google+ account. (LogOut/Change) Cancel Connecting to %s Notify me of new comments via email. RSS feed My Post PHP & Linux: Running php script on centos usingcrontab PHP: Calculate remain of years, months, days hours, minutes and second between twodates PHP:Datetime is not showing the correct local time inPHP PHP:Cannot redeclare class Config in C:\xampp\p