redeclaring _pear_call_destructors() when I require_once('DB.php')
| From: | Douglas J Livesey | Date: | Thu, 03 Mar 2005 11:47:54 +0000 |
| Subject: | redeclaring _pear_call_destructors() when I require_once('DB.php') | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17807@lists.php.net to get a copy of this message | ||
Hallo -- I have a problem trying to use PEAR::DB. When I include it in my script and then try to connect with it, I get the following error:
Compile Error: PEAR.php line 769 - Cannot redeclare _pear_call_destructors() (previously declared in C:\php\PEAR\PEAR.php:736)
Stepping through the code, I can see that my require_once('DB.php') in turn requires PEAR.php once, with no problem. But when I step through the code called by the attempt at connection, it falls over when another require_once('PEAR.php') is called. It was my understanding that require_once() should circumvent this kind of problem, but I am rather new to PHP, so could have that in error.
Also, I get alot of deprecated warnings (presumably because I'm using PHP5), but I don't know if that's relevant.
Can anyone shed any light on what I should do about this?
Thanks alot,
doug.