0

I've just installed PEAR into WAMP attempting to follow this article. It all seems to have gone okay but when I type "pear upgrade" into the command prompt I get this error:

ERROR: failed to mkdir c:\php\pear\docs\Archive_Tar\docs

It is looking on the wrong drive (and missing a subdirectory in that path by the looks of it). It should be looking for D:\php\php5.3.13\pear\docs\Archive_Tar\docs

When specifying installation directories I chose ones on the D:\ and thats where the folder structure is, the include_path in both php.ini locations have also been updated. I've also reset the WAMP server after making the changes.

How do I set it to look / install the package in the right place?

John Conde
  • 217,595
  • 99
  • 455
  • 496
Antfish
  • 1,313
  • 2
  • 22
  • 41

2 Answers2

1

My advice is to remove your complete PEAR installation and install from scratch. It'll save you time and sweat. If you have the time and patience, you can fix PEAR parameters with the config-* subcommands:

C:\>pear
Commands:
[...]
config-create          Create a Default configuration file
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Settings

Start with pear config-show to inspect current values and see if you can spot invalid ones.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
0

Open an elevated cmd and process the following commands, make sure you point the cmd to your pear dir, i am using wamp64, so i used:

cd \wamp64\bin\php\php7.3.5

the run the following 1.pear config—set doc_dir C:\wamp64\bin\php\php7.3.5

  1. pear config—set cfg_dir C:\wamp64\bin\php\php7.3.5

  2. pear config—set data_dir C:\wamp64\bin\php\php7.3.5

  3. pear config—set test_dir C:\wamp64\bin\php\php7.3.5

  4. pear config—set www_dir C:\wamp64\bin\php\php7.3.5

after, try installing your pear package