Page 1 of 1

How to install pear

Posted: Tue Jul 02, 2002 8:30 pm
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.

Posted: Wed Jul 03, 2002 12:22 am
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

Posted: Wed Jul 03, 2002 4:04 pm
by Indium
Tried that and it didn't work.

Posted: Wed Jul 03, 2002 4:09 pm
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

Posted: Wed Jul 03, 2002 5:33 pm
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.

Posted: Wed Jul 03, 2002 5:52 pm
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!

Posted: Wed Jul 03, 2002 6:03 pm
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

Posted: Wed Jul 03, 2002 6:04 pm
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>.

Posted: Wed Jul 03, 2002 7:08 pm
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.

Posted: Wed Jul 03, 2002 7:54 pm
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.

Posted: Wed Jul 03, 2002 8:15 pm
by protokol
llimllib wrote:Second, chill out dude, it's an internet php board, no need to be nasty.
Who is that directed to?

Posted: Wed Jul 03, 2002 8:33 pm
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...

Posted: Wed Jul 03, 2002 11:45 pm
by Indium
Sorry. :cry: Wasn't intended to nasty.

Posted: Thu Jul 04, 2002 6:34 am
by llimllib
it wasn't either, I was in a bad mood yesterday, i apologize.