I was just playing around with setting up my new site with a register and login system, when i refreshed this happened. I did not touch that file! (C:\xampp\php\pear\DB.php). I checked the file for errors, and the only thing i see on line 974 is a opening curly bracket. I even tried downloading a new DB.php file from pear.php.net, same error. I know the error means that there is two of the same classes, and it doesnt like that, but as far as i can see (ctrl+f search for class DB_Error) there is only one.. Tried looking the error up, but couldnt find anything.... Any help would be very appreciated, as i am new to all this stuff! (: Thanks!
Asked
Active
Viewed 1,327 times
0
-
1You are including DB.php more than one time – Think Different Jun 19 '14 at 11:27
-
Where? Im new to all of this, sorry.. I have no idea where this error occured. I never included that class in any of my htdocs... – metadog Jun 19 '14 at 11:28
-
1require 'DB.php' to require_once 'DB.php' or if inlude 'DB.php' to include_once 'DB.php' – Samar Haider Jun 19 '14 at 11:28
-
@user3753614 Don't know which register and login system you are using but I suggest Check your index.php file or header.php file if exists – Think Different Jun 19 '14 at 11:31
-
I already checked all my files through a thousand times, including index.php and all my include files. I also checked functions.php... Thanks for the quick reply though! – metadog Jun 19 '14 at 11:34
-
Forgot to tag you.. As you might have noticed im also new to this site... @ThinkDifferent – metadog Jun 19 '14 at 11:41
1 Answers
0
You have to find out where DB.php
gets included the first and the second time.
Using xdebug to get a function trace is an easy way to determine that. Install xdebug, then put a line
xdebug_start_trace('C:\trace.xt');
at the beginning of your index.php
file.
After reloading your browser and thus reproducing the error, open the trace file with a text editor and look for DB.php
. It will show you where the file gets included.

cweiske
- 30,033
- 14
- 133
- 194