I recently ran into a new error after I installed xampp for the first time on my new computer. Check it:
Cannot redeclare class 'Config' in /Applications/XAMPP/xamppfiles/lib/php/Config.php on line 44
This is happening because PHP doesn’t initially know where to look for your “config.php” file. I know I know, it’s a common name. Anyway, to fix this little gem, you need to edit your php.ini file.
Change the line in /Applications/XAMPP/etc/php.ini here:
;include_path = ".:/php/includes"
include_path = ".:/php/includes"
NOTE: you may also need to change to something like this depending on your setup:
include_path = ".;.:/php/includes"
This should tell php to look in the current working directory before looking for its root path to a random config file.