Connecting Tech Pros Worldwide Forums | Help | Site Map

PEAR: Is it worth it?

me
Guest
 
Posts: n/a
#1: Jul 17 '05
Recent articles have got me looking at PEAR again. Because it is not
always available, is it worth getting tied to? After all, if I write
for it and it isn't there, my code won't work.

Asgeir Frimannsson
Guest
 
Posts: n/a
#2: Jul 17 '05

re: PEAR: Is it worth it?


me wrote:[color=blue]
> Recent articles have got me looking at PEAR again. Because it is not
> always available, is it worth getting tied to? After all, if I write
> for it and it isn't there, my code won't work.[/color]

It is easy to install PEAR locally for your own scripts even on a shared
host. say you have a subdirectory called PEAR with all PEAR stuff in it.
This means you have to install PEAR manually, but remember that PEAR is
nothing more than a collection of PHP files.

So, even if PEAR isn't available on your shared host, you can install it
manually, and everything works. And YES, it is worth it!

asgeir
Brandon Blackmoor
Guest
 
Posts: n/a
#3: Jul 17 '05

re: PEAR: Is it worth it?


Asgeir Frimannsson wrote:[color=blue]
>
> So, even if PEAR isn't available on your shared host, you
> can install it manually, and everything works. And YES, it
> is worth it![/color]

Very much so. The database abstraction layer alone is a godsend.

bblackmoor
2004-03-18
Bruno Desthuilliers
Guest
 
Posts: n/a
#4: Jul 17 '05

re: PEAR: Is it worth it?


me wrote:[color=blue]
> Recent articles have got me looking at PEAR again. Because it is not
> always available, is it worth getting tied to? After all, if I write
> for it and it isn't there, my code won't work.[/color]

It will be there if you put it there, which is basically the same
operation as with any other php script. So don't care about this, and
just use it if it helps. Now is it worth 'getting tied to' it, only you
can answer.

My experience is that I first dismissed it, then found myself
reinventing the wheel. PEAR provides most of the building blocks for
most of the apps you could want to write in PHP.

Bruno

Thomas Damgaard Nielsen
Guest
 
Posts: n/a
#5: Jul 17 '05

re: PEAR: Is it worth it?


Brandon Blackmoor wrote:[color=blue]
> Asgeir Frimannsson wrote:
>[color=green]
>>
>> So, even if PEAR isn't available on your shared host, you[/color]
>[color=green]
> > can install it manually, and everything works. And YES, it
> > is worth it![/color]
>
> Very much so. The database abstraction layer alone is a godsend.[/color]

Hmm... Havent tried it, but sounds interesting.
Do you have a link to some info?

Mvh
Thomas Damgaard
Asgeir Frimannsson
Guest
 
Posts: n/a
#6: Jul 17 '05

re: PEAR: Is it worth it?



Thomas Damgaard Nielsen wrote:[color=blue]
> Brandon Blackmoor wrote:
>[color=green]
>> Asgeir Frimannsson wrote:
>>[color=darkred]
>>>
>>> So, even if PEAR isn't available on your shared host, you[/color]
>>
>>[color=darkred]
>> > can install it manually, and everything works. And YES, it
>> > is worth it![/color]
>>
>> Very much so. The database abstraction layer alone is a godsend.[/color]
>
>
> Hmm... Havent tried it, but sounds interesting.
> Do you have a link to some info?[/color]

Search google for 'installing pear manually' or 'installing pear shared
host' or something...

Anyway, here's the easy way of doing it:
<?php

// assuming you have a directory called PEAR
// in your current directory with all pear
// packages unzipped there...
ini_set("include_path", 'PEAR/' . PATH_SEPARATOR . ini_get("include_path"));

require_once "PEAR.php";
require_once 'DB.php';

// then we're ready to rock
?>

asgeir
Closed Thread


Similar PHP bytes