 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Sat Jul 26, 2008 8:32 am Post subject: installation problemos |
|
|
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 |
|
 |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Sat Jul 26, 2008 11:10 am Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1013
|
Posted: Sat Jul 26, 2008 1:06 pm Post subject: |
|
|
| 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 |
|
 |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Sat Jul 26, 2008 9:41 pm Post subject: |
|
|
| Is there a procedure to uninstall pear completely, and start again from scratch? Would this be helpful at all? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1013
|
Posted: Sun Jul 27, 2008 9:54 am Post subject: |
|
|
| You can simply remove all the files to "uninstall" PEAR. |
|
| Back to top |
|
 |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Sun Jul 27, 2008 12:56 pm Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1013
|
Posted: Sun Jul 27, 2008 5:20 pm Post subject: |
|
|
| 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 |
|
 |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Wed Jul 30, 2008 9:26 am Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1013
|
Posted: Wed Jul 30, 2008 3:07 pm Post subject: |
|
|
| 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 |
|
 |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Wed Jul 30, 2008 10:55 pm Post subject: |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1013
|
Posted: Thu Jul 31, 2008 7:08 pm Post subject: |
|
|
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 |
|
 |
lostInSpace
Joined: 26 Jul 2008 Posts: 9
|
Posted: Sat Aug 02, 2008 7:41 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|