Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 19th, 2004, 06:07 PM
Authorized User
 
Join Date: May 2004
Location: Dhaka, , Bangladesh.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ruhin Send a message via AIM to ruhin Send a message via MSN to ruhin Send a message via Yahoo to ruhin
Default PEAR::DB Using Problem

I used a sample script of PEAR::DB connect. But, it only
generates error. seems that i PEAR is not installed. I
thought that PEAR is installed along with PHP. Now, I need
a full tutorial on Installing PEAR. I have gone through the
pear.php.net manual but didn't understand what is a Package ?
and how to install it ? I really need this favour.
 
Old May 19th, 2004, 06:22 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

PEAR is bundled with PHP by default. But I don't think it is installed by default.

At the command line run the go-pear.php file. On Windows you need to 'cd' to the PHP directory.

Then type in:
php C:\PHP\PEAR\go-pear.php

Or
C:\PHP\php.exe C:\PHP\PEAR\go-pear.php

Where the go-pear.php script gets executed. This will initiate an installation process where the PEAR command line installer and many PEAR packages are installed.

Then once the installation is complete, upgrade DB. This time using the pear.bat file.

C:\PHP\pear.bat upgrade DB

This ought to upgrade the DB package to the latest one.

Now if you look at php.ini the include_path directive should also be modified containing a reference to the PEAR directory, with this modification it is now possible to include PEAR classes in your scripts regardless of where you have them located. In the case of DB it would simply be:

require_once 'DB.php';

You can get a list of PEAR command line options by running:
C:\PHP\pear.bat help

HTH!

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old May 21st, 2004, 08:45 PM
Authorized User
 
Join Date: May 2004
Location: Dhaka, , Bangladesh.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ruhin Send a message via AIM to ruhin Send a message via MSN to ruhin Send a message via Yahoo to ruhin
Default

It worked on a 100m run. Thanks 2K.
Take care.
 
Old June 2nd, 2004, 10:57 PM
Authorized User
 
Join Date: Apr 2004
Location: malacca, malacca, Malaysia.
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to junemo
Default

Hi,
If i run "go-pear.bat" in c:\php\ directory that mean PEAR is installed along with PHP right?

Please give me advise why I always getting this error msg-
Notice: Undefined index: cur in line..................
Notice: Undefined variable: valid in line................

Thanks in advance.

 
Old June 3rd, 2004, 12:10 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Quote:
quote:Originally posted by junemo

If i run "go-pear.bat" in c:\php\ directory that mean PEAR is installed along with PHP right?
You're supposed to run go-pear.php not go-pear.bat. That is in the PEAR subdirectory at C:\PHP\PEAR\go-pear.php.

Remember, also this has to be done at the command line.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old June 4th, 2004, 12:50 AM
Authorized User
 
Join Date: Apr 2004
Location: malacca, malacca, Malaysia.
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to junemo
Default

Hi,
I have download PEAR module and create a DB.php, PEAR.php, common.php and oci8.php. When i run my system at browser, it display error msg:
DB ERROR connect failed.

Please advise me, which part among the .php file that i need to modify and make change.

Thanks in advance,
molly.





Similar Threads
Thread Thread Starter Forum Replies Last Post
PEAR DB Connection failure bxh Beginning PHP 0 October 6th, 2005 10:25 PM
Anybody else learning to HATE pear::DB? biot023 BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 2 March 15th, 2005 04:58 AM
PEAR::Auth and PEAR::Auth_HTTP Ceriwaen Beginning PHP 1 February 18th, 2005 04:36 PM
pear db::connect turing PHP Databases 1 September 15th, 2004 05:22 PM
Using PEAR DB and Classes. TreacherousDog Beginning PHP 1 July 8th, 2003 01:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.