Home > Archive > PHP Language > May 2004 > Question related to PEAR::DB class
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Question related to PEAR::DB class
|
|
| shawn 2004-05-22, 12:30 am |
| Hi
I am trying to create a login/registration script and i am learning this on
the go.When i run the script, the first line failed at
require_once 'DB.php';
I looked through the directories and found a /usr/local/lib/php/PEAR
directory. I wonder if this means that PEAR has been installed and if so,
what else do I need to use the class?
What am I missing here?
Thanks for your help;
Shawn
| |
| Janwillem Borleffs 2004-05-22, 8:30 am |
| shawn wrote:
> require_once 'DB.php';
>
> I looked through the directories and found a /usr/local/lib/php/PEAR
> directory. I wonder if this means that PEAR has been installed and if
> so, what else do I need to use the class?
>
See:
http://pear.php.net/manual/en/insta...on.introduction
It basically involves applying the pear cli, with the `install` command and
the package name, e.g.:
$ pear install DB
It's just as easy as Perl's CPAN installation...
JW
| |
| Patrick Crocker 2004-05-22, 2:33 pm |
| If PEAR.php and DB.php are in the directory you listed... you can either
modify the php.ini so that the pear directory is in the include path, or you
can put this in your script:
<?
ini_set(include_path, "/usr/local/lib/php/PEAR");
require_once('DB.php');
?>
- Patrick.
"shawn" <my_email@email.com> wrote in message
news:JBzrc.93377$Zxc.33720@news04.bloor.is.net.cable.rogers.com...
> Hi
>
> I am trying to create a login/registration script and i am learning this
on
> the go.When i run the script, the first line failed at
>
> require_once 'DB.php';
>
> I looked through the directories and found a /usr/local/lib/php/PEAR
> directory. I wonder if this means that PEAR has been installed and if so,
> what else do I need to use the class?
>
> What am I missing here?
>
> Thanks for your help;
>
> Shawn
>
>
>
| |
| shawn 2004-05-22, 11:30 pm |
| Great help! I got it to work with your suggestion, although my server setup
wasn't exactly like this.
Thanks!
Shawn
"Patrick Crocker" <patrick.crocker@verizon.net> wrote in message
news:RHLrc.5071$No1.835@nwrddc02.gnilink.net...
> If PEAR.php and DB.php are in the directory you listed... you can either
> modify the php.ini so that the pear directory is in the include path, or
you
> can put this in your script:
> <?
> ini_set(include_path, "/usr/local/lib/php/PEAR");
> require_once('DB.php');
> ?>
>
> - Patrick.
>
> "shawn" <my_email@email.com> wrote in message
> news:JBzrc.93377$Zxc.33720@news04.bloor.is.net.cable.rogers.com...
> on
so,[color=darkred]
>
>
|
|
|
|
|