Re: PEAR usage
| From: | Stig S. Bakken | Date: | Sun, 26 May 2002 11:20:26 +0000 |
| Subject: | Re: PEAR usage | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6429@lists.php.net to get a copy of this message | ||
On Sun, 2002-05-26 at 13:06, Alan Knowles wrote:
> Most of the app's I write currently include more and more PEAR code, and
> have to be installed on hosts that may/may not have PEAR installed.
> I normally put the PEAR code within my application folder, (not a web
> root though), previously I just copy and pasted from
> http://cvs.php.net/pear, however the installer (with a few
> fixes) works
> very well.
>
> This is a hint :
>
> cd /home/me/myapps/phpBB
>
> pear -c .pearconfig config-set ext_dir /home/me/myapps/phpBB
> pear -c .pearconfig config-set doc_dir /home/me/myapps/phpBB/peardocs
>
> pear -c .pearconfig install DB PEAR Net_Curl Mail .......
>
> or a couple of months later
>
> pear -c .pearconfig update DB PEAR
>
> (or what would be nice )
>
> pear -c .pearconfig install-cvs Image_Transform
>
> ------------------
>
> the only slight flaw with this is that DB.php and PEAR.php get put in
> the base directory of the application.- something that would be nice to
> remove........, but I can live with it :)
I think of library files and application files as different things.
Everything that is in PEAR today is basically library files.
Application files are in your document root. PEAR will support both,
and let you install them in different locations. Would that solve your
slight flaw?
> i've not come accross many hosts that dont allow something like this..
> ini_set('include_path','home/me/myapps/myapp'); //stops conflicts of
> the 'system PEAR code and any updates/modifications I've had to make'
>
> I'm sure theres many other ways around this:)
>
> regards
> alan
>
> Dan Allen wrote:
>
> >I have been talking to leading developers of several projects,
> >including phpBB about using PEAR as the database abstraction layer
> >amoung other things...I just wanted to report back to you the
> >feedback I got and the reason the answer is still NO.
> >
> >PEAR needs to be able to work without having the libraries in the
> >include path (since it is not possible to modify this setting at
> >runtime). The reason for this is that many webhosts have not yet
> >become acquainted with PEAR and therefore do not have it installed.
> >Here is my solution...the PEAR installer should run though the
> >libraries and somehow resolve the paths, or perhaps we should think
> >of a way for the libraries to be able to call themselves without
> >requiring PEAR to be in the include path...
> >
> >People need to be able to run PEAR libaries without them being in
> >the system include path...if that is done, then PEAR can be embedded
> >in applications. Let me know what you think.
I guess you're thinking about using a global/constant as the PEAR
install dir and use it in every include? Lots of applications do that,
but I don't want to do it in PEAR because it will ruin the possibility
of making a per-user/app/whatever set of packages that override the
global ones.
But I realize this is a problem for safe_mode users. I'll try to think
of something, and I am open to suggestions as long as people who _don't_
use safe_mode suffer. :-)
- Stig