You are here: Re: Moving PEAR installation (for self-contained class library) « PHP « IT news, forums, messages
Re: Moving PEAR installation (for self-contained class library)

Posted by Jason Barnett on 10/07/10 11:17

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация