[phplib] How do I "undeclare" Db_Sql ? From: Maxim Maletsky (max <email protected>)
Date: 01/26/01

Hi, I have the following problem:

I use PHPLIB with auto_prepend of PHP.ini on my local Win2k (and remote
FreeBSD) servers.
The software I am developing has it's own <virtual host> and uses phplib BUT
a different, suited for it copy in a different from the main PHPLIB folder
which is inside the root (due the fact that the software will be released as
GPL with some components of phplib) .

i.e:

/home/httpd/html/phplib - PHPLIB (default one auto_prepended by PHP.ini)
/home/httpd/html/site1 - other my sites ...
/home/httpd/html/site2 - other my sites ...
/home/httpd/html/site3 - other my sites ...
/home/httpd/html/site4 - other my sites ...
/home/httpd/html/software - my software root...
/home/httpd/html/software/phplib - PHPLIB dedicated to my software...

If I use include(phplib/prepend.php3) accessing the file I get the error
saying: "Fatal error: Cannot redeclare class db_sql in
p:/software/phplib/db_mysql.inc on line 12"

This is obviously because class Db_Sql was already declared by auto_prepend
file which is also active on this site as on others on the server. I cannot
change all the running sites settings.

How do I avoid auto_prepend of php.ini on software root?

I would prefer to do it by using some php statement on
software/phplib/prepend.php3. (Not every user will be able to change
httpd.conf or php.ini)

Any ideas?

Thanks in advance.

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 maxim <email protected>
 www.phpbeginner.com

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>