How use PEAR when include_path cannot be set?

From: Date: Sat, 27 Dec 2008 17:34:20 +0000
Subject: How use PEAR when include_path cannot be set?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29541@lists.php.net to get a copy of this message
Hello I am developing an application and use several PEAR packages. In order to be able to install the application on any webserver without bothering about the ISP's PEAR installations, I made a manual installation of the PEAR packages inside a directory /tools/PEAR/ and added this directory to the include_path via ini_set(), somehow like: define('TOOLS_DIR', $_SERVER['DOCUMENT_ROOT'].'/tools/PEAR/'); ini_set('include_path', TOOLS_DIR.'PEAR'.PATH_SEPARATOR.ini_get('include_path')); Now this worked fine so far, but now ini_set() started to fail on one server. The provider informed me that PHP 5.2 does not allow setting an include_path via ini_set() or set_include_path(), if there is already one set at domain level in the Apache config. Now this looks like a major problem to me in shared hosting environments; I would not want an application be dependent on server-side settings that can only be changed by the ISP's support crew, and I don't either want to edit the PEAR class files. Is there a recommended way to handle this in PEAR? Such as a constant or an option that could be set to tell PEAR about the correct include path? Thanks for your comments! Markus

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