Andrei Verovski (aka MacGuru) wrote:
Hi,
I have a PEAR-related question. My class library using some PEAR
packages, and I would like to make it self-contained, i.e. to be able
to move it to a server (for example MacOS X) which do not have (and
will not require) installation of any PEAR package(s).
What I would like to do is just to copy whole PEAR directory from
the /usr/share/php5 in the corresponding subdir of my class library.
The question is - how to make this work transparently. What global
php_ini variables need to be changed? Just ¨include_path¨ or anything
else?
Thanks in advance for any suggestion(s).
************************************************
*** with best regards
*** Andrei Verovski (aka MacGuru)
*** Mac, Linux, DTP, Programming Web Site
***
*** http://snow.prohosting.com/guru4mac/
************************************************
include_path is the only php.ini setting that might need to be changed.
But why exactly are you planning on bundling the PEAR classes? There
are several reasons why this isn't a great idea:
- New versions of the scripts you need are released, but users
downloading your package will have outdated (and probably buggy) versions
- For people that already *do* have PEAR, they're probably going to get
confused when trying to debug... and get really annoyed when they find
out it's because PHP was trying to read *your* PEAR library instead of
the global one
- It's easier (in terms of getting access from server admin) to add more
php files to the web root than it is to get access to php.ini
There is really only one advantage that I can see here: you don't have
to worry about BC / your custom library will "just work". In my opinion
however it's just not worth it for the reasons listed above.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php