How to install pear

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Indium
Forum Newbie
Posts: 15
Joined: Tue Jul 02, 2002 8:30 pm

How to install pear

Post by Indium »

I have php 4.2 installed (win32 binaries) but I don't see any pear directory so I assume I do not have pear installed. Also DB:: connect doesn't seem to work. I checked out the pear.php.net site and it says I need to install the pear packager manager first by typing $ lynx..... in a console. What console are they referring to? Is there a simple zip download that can do this? As you can see I am a newbie at this, so go easy on me.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

first of all, if you're trying to use the DB::connect() function, then make sure that at the top of the script attempting to access that function, you have:

require_once 'DB.php';

This will allow you to use all of the PEAR DB abstraction functions
Indium
Forum Newbie
Posts: 15
Joined: Tue Jul 02, 2002 8:30 pm

Post by Indium »

Tried that and it didn't work.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Well, I'm not 100% certain about this, but the win32 installer (.exe) may not contain the PEAR extensions. Try unzipping and installing the files contained in the .zip file. I just checked with someone, and they said that this distribution DOES have the PEAR installed.

http://www.php.net/do_download.php?down ... -Win32.zip
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

yeah, pear comes included in the binary, but you have to add it to your php.ini file extensions path. from my php.ini:

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"  
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;c:\php\extensions;c:\php\pear;"
I had to include pear manually, you probably do too.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Well, I'm a linux guy, so I don't run into many of these problems :wink:

But I assume that you figured out what went wrong, so good luck with the rest of your coding!
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

I would be if I could just get Photoshop for Linux...oh well, cygwin does me OK, because i can't take the GiMP
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Yeah, the GIMP GUI just needs to be redone so that it looks exactly like Photoshop. I mean, it can do everything that Photoshop can do, but the UI is just so <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>.
Indium
Forum Newbie
Posts: 15
Joined: Tue Jul 02, 2002 8:30 pm

Post by Indium »

yeah, pear comes included in the binary, but you have to add it to your php.ini file extensions path. from my php.ini: Code:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;c:\php\extensions;c:\php\pear;"
If I do have it then I should have a pear directory within the php directory, which I don't, so I'll guess I'll try the zip file. Thanks.
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

First, yes, the zip file does include the pear directory. When I said 'the binary', I meant the binary build of php, as opposed to the source code. It is quite possible that the exe installer does not contain the pear directory, as I don't use the exe. I apologize for the confusion.
Second, chill out dude, it's an internet php board, no need to be nasty.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

llimllib wrote:Second, chill out dude, it's an internet php board, no need to be nasty.
Who is that directed to?
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

If I do have it then I should have a pear directory within the php directory, which I don't, so I'll guess I'll try the zip file. Thanks.
seemed like he was being sarcastic...maybe i'm just tired after a long day of work...
Indium
Forum Newbie
Posts: 15
Joined: Tue Jul 02, 2002 8:30 pm

Post by Indium »

Sorry. :cry: Wasn't intended to nasty.
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

it wasn't either, I was in a bad mood yesterday, i apologize.
Post Reply