[thelist] Using PEAR on hosts that don't have PEAR installed
David Bindel
dbindel at austin.rr.com
Mon Aug 4 00:36:32 CDT 2003
Howdy listers,
I'm working with a team on a web-based control panel for game servers
that will eventually be installed on many web servers (none of which we
have control of.) The problem I have run into is using PHP's PEAR
classes if the web server doesn't have PEAR installed, available, and
enabled.
It was suggested in my last thread regarding PEAR that I could easily
use the PEAR files that I need by including the files in the
distribution of the product. I tried that thinking that it would work
fine, but after seeing plenty of errors after I had copied the PEAR
files into my software, I've realized that PEAR is heavily dependent on
PHP's include_path being set to include the PEAR directory (for example,
include_path=".;C:\PHP\pear;C:\PHP\pear;C:\PHP\cli\pear" in PHP.ini on
Windows.)
The two possible solutions (untested as of yet) to this obstacle I've
thought of are:
1) using ini_set() at the top of every page that utilizes PEAR
functionality to add the PEAR directory to include_path.
2) creating a .htaccess in every directory to set the include_path to
include the PEAR directory.
Isn't there an easier way to do this? I'd really appreciate y'all's
comments and suggestions on this.
Thanks in advance,
David
--
David I. Bindel
Website Development
dbindel at austin.rr.com
www.davidbindel.com
More information about the thelist
mailing list