简体   繁体   中英

Error installing go-pear.phar in Windows 10 with XAMPP

I am always getting an error while trying to install go-pear.phar

This is the error, after hit Enter to the question 1-13, 'all' or Enter to continue:

1-13, 'all' or Enter to continue:
**ERROR**
Please, enter the php.exe path.

I had PHP installed in my environment path as well. I did check with php --version and got the message

C:\xampp\php>php --version
PHP 7.2.31 (cli) (built: May 12 2020 10:26:32) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

So I proceed to install go-pear.phar with the command. But I'm keep being stuck in error above.

C:\xampp\php>php go-pear.phar

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : C:\xampp\php
 2. Temporary directory for processing            : C:\xampp\php\tmp
 3. Temporary directory for downloads             : C:\xampp\php\tmp
 4. Binaries directory                            : C:\xampp\php
 5. PHP code directory ($php_dir)                 : C:\xampp\php\pear
 6. Documentation directory                       : C:\xampp\php\docs
 7. Data directory                                : C:\xampp\php\data
 8. User-modifiable configuration files directory : C:\xampp\php\cfg
 9. Public Web Files directory                    : C:\xampp\php\www
10. System manual pages directory                 : C:\xampp\php\man
11. Tests directory                               : C:\xampp\php\tests
12. Name of configuration file                    : C:\WINDOWS\pear.ini
13. Path to CLI php.exe                           :

1-13, 'all' or Enter to continue:
**ERROR**
Please, enter the php.exe path.

I ran into this issue as well, and after many different attempts I finally got it to work by.

opening command prompt

cd \xampp\php

C:\xampp\php\php go-pear.phar

Are you installing a system-wide PEAR or a local copy? (system|local) [system]:

Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations.

  1. Installation base ($prefix): C:\xampp\php
  2. Temporary directory for processing: C:\xampp\php\tmp
  3. Temporary directory for downloads: C:\xampp\php\tmp
  4. Binaries directory: C:\xampp\php
  5. PHP code directory ($php_dir): C:\xampp\php\pear
  6. Documentation directory: C:\xampp\php\docs
  7. Data directory: C:\xampp\php\data
  8. User-modifiable configuration files directory: C:\xampp\php\cfg
  9. Public Web Files directory: C:\xampp\php\www
    1. System manual pages directory: C:\xampp\php\man
    2. Tests directory: C:\xampp\php\tests
    3. Name of configuration file: C:\WINDOWS\pear.ini
    4. Path to CLI php.exe:

1-13, 'all' or Enter to continue: 13

which pops up a windows Browse for Files or Folders

Windows Browse for Files or Folders

select the folder C:\xampp\php not the file php.exe then select "OK"

you then get

php.exe (sapi: cli) found.

Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations.

  1. Installation base ($prefix): C:\xampp\php
  2. Temporary directory for processing: C:\xampp\php\tmp
  3. Temporary directory for downloads: C:\xampp\php\tmp
  4. Binaries directory: C:\xampp\php
  5. PHP code directory ($php_dir): C:\xampp\php\pear
  6. Documentation directory: C:\xampp\php\docs
  7. Data directory: C:\xampp\php\data
  8. User-modifiable configuration files directory: C:\xampp\php\cfg
  9. Public Web Files directory: C:\xampp\php\www
    1. System manual pages directory: C:\xampp\php\man
    2. Tests directory: C:\xampp\php\tests
    3. Name of configuration file: C:\WINDOWS\pear.ini
    4. Path to CLI php.exe: C:\xampp\php\

1-13, 'all' or Enter to continue: [Enter]

hit the enter key and you will get

Beginning install... Configuration written to C:\WINDOWS\pear.ini... Initialized registry... Preparing to install...

I even tried just typing in the folder manually as C:\xampp\php\ before, as it lists after selecting it, but it continues with the error. But selecting the folder in the window works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM