Re: PEAR::DB_DataObject Overload-ERRMSG

From: Date: Thu, 24 Jun 2004 09:06:45 +0000
Subject: Re: PEAR::DB_DataObject Overload-ERRMSG
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13302@lists.php.net to get a copy of this message
Alan Knowles wrote:
In index.php I required all PEAR-Packages that I need require_once('pear/DB.php'); require_once('pear/DB/DataObject.php'); require_once('pear/DB/DataObject/FormBuilder.php'); require_once('pear/DB/QueryTool.php'); require_once('pear/HTML/quickform.php'); require_once('pear/HTML/TreeMenu.php');
It's far better to do: ini_set('include_path', dirname(__FILE__).PATH_SEPERATOR.
            dirname(__FILE__).'/pear'.PATH_SEPERATOR
);
Sorry, but I don't understand this syntax. Could you fill it with real names, please? What I did now, is following: ini_get("include_path") . ".;z:\htdocs\project\test\pear" ); my standard pear installation is in "z:\htdocs\pear", but I need to put it directly into the project-folders, here it is "test".
** this ensures that a) pear's paths work b) you only make available the pear packages versions that you know work c) changes to the installed system's pear code will not affect you..
I didn't get b). Could you explain?
then require_once('DB.php'); require_once('DB/DataObject.php'); require_once('DB/DataObject/FormBuilder.php'); require_once('DB/QueryTool.php'); require_once('HTML/quickform.php'); require_once('HTML/TreeMenu.php');
I did this.
you cant mess around with the paths for pear - all the packages depend internally on the fact that it works like this.
Yes, that's what I finaly find out through this threat. :-) Lucky, I am!
Regards Alan
Thanks Alan

« previous php.pear.general (#13302) next »