I\'ve downloaded the ZIP archive of PHP and extracted it under my profile. I then needed some PEAR packages. go-pear.bat
apparently installed PEAR just fine, I just
If your PHP installation has been done somewhere else other than the C:\ drive, then “pear install” command may throw errors.
Example: Here in my case, the xampp has been installed into E:\ drive and the “pear install” throws error.
Error got when I run the command. This also happen for PHPDocumentor Solution: I get into the “pear” directory and checked config values set for different pear related directories. All were set to C:\ drive by default. So, we need to change those settings to correct path. Open the command prompt in "Run as administrator" mode.
Pear default setting Now change five path in xampp like this
E:\xampp\php>
E:\xampp\php>pear config-set doc_dir E:\xampp\php\pear
If you are using C drive and getting the same error then also the above statement will remain same just replace the drive name E:\ to C:\ vice versa. example for C: drive
C:\xampp\php>pear config-set doc_dir C:\xampp\php\pear
Then press enter it will display a msg of config-set succeeded
Like this you have to enter 5 commands.
E:\xampp\php>pear config-set doc_dir E:\xampp\php\pear
config-set succeeded
E:\xampp\php>pear config-set cfg_dir E:\xampp\php\pear
config-set succeeded
E:\xampp\php>pear config-set data_dir E:\xampp\php\pear
config-set succeeded
E:\xampp\php>pear config-set test_dir E:\xampp\php\pear
config-set succeeded
E:\xampp\php>pear config-set www_dir E:\xampp\php\pear
config-set succeeded
Finally installed pear