The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Failure re-declaring config.php - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Failure re-declaring config.php (/showthread.php?tid=360) |
Failure re-declaring config.php - grumpy-gnome - 11-23-2016 I'm testing out the latest UserSpice on an XAMPP install (v5.6.3) and get the following when I attempt to access a page having successfully logged on: Code: Fatal error: Cannot redeclare class Config in C:\xampp\php\pear\Config.php on line 44 This appears to be because UserSpice and XAMPP both use the Config.php function and despite the evidence from the videos (!) my install of XAMPP doesn't seem to want to play nicely... What's really confusing is that the UserSpice admin pages are fine and work normally. I copied and pasted the lines suggested in the UserSpice index page into my own php file to place the page under user control. These lines are: <pre> Code: require_once 'users/init.php'; Any ideas? Failure re-declaring config.php - grumpy-gnome - 11-24-2016 <Later> Apologies about replying to my own post but I have been doing some more digging. There is indeed an alternative class in the Xampp pear library called Config that offers a number of functions such as isConfigTypeRegistered and registerConfigType. I notice that the videos use WAMP and not XAMPP so I'll try an install of that. Failure re-declaring config.php - grumpy-gnome - 11-24-2016 <Even Later> Yep - problem seems to be a clash in Xampp. All works fine with WAMP64. Maybe worth noting that there is a class naming conflict though to help avoid others make this mistake... Anyway, all sorted for me now. Hope my experience helps other noobs. Failure re-declaring config.php - mudmin - 11-24-2016 I think it's something different. The bulk of development of 4.1 was done on XAMPP. That's pretty much all I've been using for the past few months. What happens if you rename the class config2 and then change the init file to link to config2? I will try installing a newer xampp and see what happens on my end. Failure re-declaring config.php - mudmin - 11-24-2016 I'm running on version 5.6.15 without issue. I wonder if you should download a newer version of xampp. Failure re-declaring config.php - mudmin - 11-24-2016 If you're on linux... http://stackoverflow.com/questions/25145875/class-config-conflict-in-xampp-xamppfiles-lib-php-config-php This is straight from the makers of xampp. I'm guessing an update (if you're able) will solve your problem. https://community.bitnami.com/t/error-after-install-fatal-error-cannot-redeclare-class-config/25114/4 Failure re-declaring config.php - grumpy-gnome - 11-25-2016 Yep, having something approaching "modern" would be good I hadn't realise just how woefully out-of-date I'd become! As it happens I switched to WAMP64 which seems to be working fine. Thanks for the links though. Failure re-declaring config.php - mudmin - 11-25-2016 I absolutely love WAMP...the only thing I would say is that the database is a LOT slower. I have a db table with 3800 rows in it and a query on WAMP can take 5 seconds where XAMPP is a fraction of a second. |