PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
installation problemos

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Installation, Upgrading & Configuration
View previous topic :: View next topic  
Author Message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Sat Jul 26, 2008 8:32 am    Post subject: installation problemos Reply with quote

Hello all,

Having a few issues with my recent pear installation:

I'm running windows xp sp2, apache2, and php 5.2.6. For what ever reason, I couldn't install pear through the Windows Command Prompt, so I just double-clicked on the go-pear.bat file to install pear manually.

The pear installer change my include path in my php.ini file to:
include_path=".;C:\php5\pear;

After installing pear, I ran the PEAR_ENV.reg to add the installation path.

All should be cool, but:

PROBLEM 1:
But now, if I try to run the PEAR Package Manager from the Windows Command Prompt, I get the following error:

'pear' is not recognized as an internal or external command, operable program or batch file

PROBLEM 2:
NOW, because I couldn't find a way to run the PEAR Package Manager, I just started downloading pear packages and manually copying them to the pear directory at C:\php5\pear. I've gotten some to work, like DB.php, but when I try to use Auth_HTTP.php, I get this error:

Fatal error: Class 'Auth' not found in C:\php5\pear\Auth_HTTP.php on line 54

As far as I've read, I've downloaded all dependent classes, but I don't think I'm getting the directory structure correctly, because like the error states, some classes just aren't being found.

So what the crap do I do? Should I reinstall pear? Should I shoot myself? Is there some reference as to how to structure the subdirectories within the pear directory? And what's with the registry not recognizing pear? Like, how come I can't run it from the Command Prompt?


Thanks!
Back to top
View user's profile Send private message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Sat Jul 26, 2008 11:10 am    Post subject: Reply with quote

wow, ok, I answered my first question, but I opened another can of worms...

I added php.exe to my system's path environment variable to be able to run go-pear.php from the windows command prompt, great, I was then able to get the real pear installer to run and it downloaded all necessary stuff...

When the installer finished, it told me that the 'pear' command is now at my service at c:\apache2\htdocs\bin\pear.bat

But when I tried to run it, no dice...looked in the directory c:\apache2\htdocs\bin\ and guess what? No pear.bat file, in fact, empty.

So I search for the pear.bat file on my drive, I find it in my php5 directory, where it came included with the php5 installation. So I move it to where the installer said it should be found, to c:\apache2\htdocs\bin\, run it and, I get this error:

WARNING: This is a raw, uninstalled pear.bat
...fakeprompt PHP_PEAR_INSTALL_DIR is not set correctly.

It asks me to fix this problem by either using my environment variable or modify the default value in pear.bat.

Now I'm at a total loss...how do I fix this? What the crap do I do, and why is this so complicated?

Thanks!
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Sat Jul 26, 2008 1:06 pm    Post subject: Reply with quote

lostInSpace wrote:
When the installer finished, it told me that the 'pear' command is now at my service at c:\apache2\htdocs\bin\pear.bat

But when I tried to run it, no dice...looked in the directory c:\apache2\htdocs\bin\ and guess what? No pear.bat file, in fact, empty.


Maybe a permission issue? No write permissions in that directory for whatever reason? On the other hand, you should have gotten an error message about the failed copy operation.

lostInSpace wrote:
So I search for the pear.bat file on my drive, I find it in my php5 directory, where it came included with the php5 installation. So I move it to where the installer said it should be found, to c:\apache2\htdocs\bin\, run it and, I get this error:

WARNING: This is a raw, uninstalled pear.bat
...fakeprompt PHP_PEAR_INSTALL_DIR is not set correctly.

It asks me to fix this problem by either using my environment variable or modify the default value in pear.bat.


Well, either edit the pear.bat file and replace the default paths by the paths that are valid for your system, or add an environment variable named 'PHP_PEAR_INSTALL_DIR' via Windows' control panel ("System").

lostInSpace wrote:
[...]why is this so complicated?


In general, it isn't complicated. In fact, the installation on my system didn't cause any problems and was done in just a few minutes. But sometimes there are systems with special cases -- no offense, it's just the way it is ...
Back to top
View user's profile Send private message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Sat Jul 26, 2008 9:41 pm    Post subject: Reply with quote

Is there a procedure to uninstall pear completely, and start again from scratch? Would this be helpful at all?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Sun Jul 27, 2008 9:54 am    Post subject: Reply with quote

You can simply remove all the files to "uninstall" PEAR.
Back to top
View user's profile Send private message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Sun Jul 27, 2008 12:56 pm    Post subject: Reply with quote

thanks Mark,

I appreciate your advice and your patience... I really want to get back into php/pear/msql/zend in a deep way, so want to have the pear stuff around locally to use it to test.

Thanks again...

And oh, you said I could just remove all the pear files, but what about the registry? Should I clean the registry too, I'm aware of how to do this...

Thanks again!
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Sun Jul 27, 2008 5:20 pm    Post subject: Reply with quote

Are you talking about the Windows registry? PEAR should write any data to this registry. PEAR has its own registry (not OS specific), which is a simple file. And these files can also be deleted, yes. (IIRC it is a directory named .registry).
Back to top
View user's profile Send private message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Wed Jul 30, 2008 9:26 am    Post subject: Reply with quote

Yes, I believe they're written to the Windows registry, but I'm not too sure, I'm just learning all of this stuff:

I'm talking about when I run regedit, under My Computer>HKEY_CURRENT_USER>Environment, there are multiple paths registered, ie, Name = PHP_PEAR_BIN_DIR; Type = REG_SZ; Value = C:\apache2\htdocs\bin ... and so on ...

What are these registrations and do I need to mess with them when trying to fix and or reinstall pear?


Also, now when I run the pear.bat file, I get the error that the PHP_PEAR_INSTALL_DIR is not set correctly, saying it's current set to C:\apache2\htdocs\binpear

But this directory doesn't exist?

When I look in the pear.bat file to try to change this, the I can't find that path as a variable anywhere...

Uhh?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Wed Jul 30, 2008 3:07 pm    Post subject: Reply with quote

lostInSpace wrote:
Yes, I believe they're written to the Windows registry, but I'm not too sure, I'm just learning all of this stuff:

I'm talking about when I run regedit, under My Computer>HKEY_CURRENT_USER>Environment, there are multiple paths registered, ie, Name = PHP_PEAR_BIN_DIR; Type = REG_SZ; Value = C:\apache2\htdocs\bin ... and so on ...

What are these registrations and do I need to mess with them when trying to fix and or reinstall pear?


On my system these values are identical to the ones that can be found (and edited) in Windows' Control Panel / System / Extended / Environment Variables (upper section).

lostInSpace wrote:
Also, now when I run the pear.bat file, I get the error that the PHP_PEAR_INSTALL_DIR is not set correctly, saying it's current set to C:\apache2\htdocs\binpear


This is quite similar to the PHP_PEAR_BIN_DIR environment variable that you've mentioned above. The missing trailing slash might have caused that 'bin' and 'pear' got concatened together.
But this directory doesn't exist?

lostInSpace wrote:
When I look in the pear.bat file to try to change this, the I can't find that path as a variable anywhere...


Would it be possible that there are multiple files named pear.bat on your system? One containing the path, the other(s) not containing it?

In my pear.bat, the install dir is defined around line 30.
Back to top
View user's profile Send private message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Wed Jul 30, 2008 10:55 pm    Post subject: Reply with quote

Wow, now it says "C:\php5" is not recognized as an internal or external command, operable program or batch file


But it is! It's set in my environment variables system's path!


???
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Thu Jul 31, 2008 7:08 pm    Post subject: Reply with quote

You don't make it easy to help you ...

How about some more detailed information about the steps you took, and especially the command(s) that caused the reported error message?

Anyway, the message likely indicates that there is a space somewhere in the path (without using quotes), i.e. the path ends on the space.
Back to top
View user's profile Send private message
lostInSpace



Joined: 26 Jul 2008
Posts: 9

PostPosted: Sat Aug 02, 2008 7:41 am    Post subject: Reply with quote

Hey Mark,

Listen, sorry if I wasn't clear, I really appreciate your effort in problem solving on this forum, you seem to contribute quite a lot...

Basically, I was having an issue running pear.bat from the windows command prompt, therefore unable to install any new packages using the installer. I had in most cases manually configured the Paths correctly, but the version of PEAR_ENV.reg seemed to favor other paths to binaries that were not valid with my directory configuration for php and pear...

I have solved the issue by various reinstalls and manually changing the paths.

Once I got the Pear Installer up and running through the command line, it was clear that it was dated, preventing me from installing packages, so I downloaded and manually installed the current pear installer, and all was good throughout the land.

Seriously though, thanks for your assistance!
Back to top
View user's profile Send private message
code_play



Joined: 04 Oct 2010
Posts: 4

PostPosted: Sun Oct 24, 2010 7:46 pm    Post subject: Reply with quote

Hi lostinspace,

It is currently happening what just had happened to you.

I would really appreciate if you share the steps you have done to resolve this issue.

Thanks!
Back to top
View user's profile Send private message
JackPotte



Joined: 30 May 2011
Posts: 2
Location: France

PostPosted: Tue Jun 07, 2011 3:59 pm    Post subject: Reply with quote

Same problem on Windows server 2008 with IIS, whereas it works with Apache... I've opened a bug:
https://pear.php.net/bugs/bug.php?id=18590&thanks=1
Back to top
View user's profile Send private message
chengliu



Joined: 01 Jun 2011
Posts: 6

PostPosted: Thu Jun 09, 2011 11:37 am    Post subject: Reply with quote

In your profile you will find an option Hide your online status; if you switch this on you'll only appear to board administrators or to yourself. You will be counted as a hidden user.
_________________
RS Gold
Runescape Gold
Buy RS Gold
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Installation, Upgrading & Configuration All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement