Installing 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
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Installing PEAR

Post by Nunners »

I’m trying to install PEAR onto Windows 2000 server, which has Apache etc etc.

- I’ve started the command line, and opened go-pear.php…
- successfully gone through setting up the options…
- But come across with the following when I try and complete installation:

Fatal error: main(): Failed opening required 'PEAR.php' (include_path='/C:\DOCUME~1\ADMINI~1.DEV\LOCALS~1\Temp\gop58.tmp') in c:\www\pear\Archive\Tar.php on line 21

What does it mean?
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

You need to specify the correct include_path in yout php.ini file.
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

I've already got it in my include_path (:

Is there anything else?
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Can you post your include_path line from your php.ini file?

The error reported shows that the only path to look into is a temp directory.
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

This is my include line:
include_path = ".;c:\php\includes;c:\www\smarty\libs;c:\www\pear"
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

It looks like the installer has failed to copy the pear.php file to the temp directory.

Is this a local or net install?

If it's local, do you have the pear.php file in php/pear/go-pear-bundle
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

It is local....

PEAR.php is in the go-pear-buncle folder....
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Can you tell me what the last few lines of output of the installer is prior to the error?
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

The whole command line return reads as follows:....

Loading zlib: ok
Using local package: PEAR.............ok
Using local package: Archive_Tar......ok
Using local package: Console_Getopt....ok
Using local package: XML_RPC..........ok
Bootstrapping: PEAR...................(local) ok
Bootstrapping: Archive_Tar............
Warning: mkdir(Archive): File exists in C:\www\pear\go-pear.php on line 595
(local) ok
Bootstrapping: Console_Getopt.........
Warning: mkdir(Console): File exists in C:\www\pear\go-pear.php on line 609
(local) ok
Using local package: DB...............ok
Using local package: Net_Socket.......ok
Using local package: Net_SMTP.........ok
Using local package: Mail.............ok
Using local package: XML_Parser.......ok
Using local package: PHPUnit..........ok
Extracting installer..................
Warning: main(PEAR.php): failed to open stream: No such file or directory in C:\
www\pear\Archive\Tar.php on line 21

Fatal error: main(): Failed opening required 'PEAR.php' (include_path='/C:\DOCUM
E~1\ADMINI~1.DEV\LOCALS~1\Temp\gop2.tmp') in C:\www\pear\Archive\Tar.php on line
21
After having tried it a number of times - thinking I was being stupid - it keeps getting a couple of lines where it says the file is already there... but I don't think they are causing a problem... or are they?!!!
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

The warnings about files/directories already being there should not make any difference.

Have a look in the temp directory as quoted by the include_path within the error a see if the PEAR.php file exists in that directory.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Nunners wrote: After having tried it a number of times - thinking I was being stupid - it keeps getting a couple of lines where it says the file is already there... but I don't think they are causing a problem... or are they?!!!
Definitely no. The issue is your include_path (as you can see from error message). For some reason it points to: /C:\DOCUM
E~1\ADMINI~1.DEV\LOCALS~1\Temp\gop2.tmp (it's current directory perhaps), but does not include c:\www\pear
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

Do i need to include the c:\www\pear in my windows path as well?
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

The pear installer runs in a temporary directory, the install script sets the include path to that temporary directory.

The neccessary files/directories should also be copied to that temporary directory.

You should not need to add anything to your Windows PATH variable as PHP does not use this.

You need to work out if the install script is running in the correct directory, and if so are the files (PEAR.php in this case) available within this directory.

If the install script is not running in the correct directory, you need to work out why.
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Still having problems

Post by Nunners »

I've successfully "manually" installed PEAR onto my windows server after trying
many attempts at installing it properly - however, it's prooving a pain in the
arse to upgrade the packages, and install any new ones.

So, can anyone assist in why it won't install?

Loading zlib: ok
Using local package: PEAR.............ok
Using local package: Archive_Tar......ok
Using local package: Console_Getopt....ok
Using local package: XML_RPC..........ok
Bootstrapping: PEAR...................(local) ok
Bootstrapping: Archive_Tar............
Bootstrapping: Console_Getopt.........
Using local package: DB...............ok
Using local package: Net_Socket.......ok
Using local package: Net_SMTP.........ok
Using local package: Mail.............ok
Using local package: XML_Parser.......ok
Using local package: PHPUnit..........ok
Extracting installer..................
Warning: main(PEAR.php): failed to open stream: No such file or directory in C:\
www\pear\Archive\Tar.php on line 21

Fatal error: main(): Failed opening required 'PEAR.php' (include_path='/C:\DOCUM
E~1\ADMINI~1.DEV\LOCALS~1\Temp\gop1.tmp') in C:\www\pear\Archive\Tar.php on line
21
Post Reply