How to solve the error when installing pear php5.3.1 in Windows

Source: Internet
Author: User

Phar "C: \ PHP \ pear \ go-pear.phar" doesNotHave a signature

PHP warning: require_once(Phar: /// go-pear.phar/index. php): Failed to open stream: phar error: Invalid URL or non-existent phar "phar: // go-pear.phar/index. php"InC: \ PHP \ pear \ go-pear.phar on line1236

But the command line method in php.exe can be smoothly installed (see http://blog.pear.php.net/2009/07/01/php-53-windows-and-pear ):

Open a command line window, switch the directory to the PHP Directory (my directory is "C: \ PHP"), and enter PHP-D phar. require_hash = 0 pear/go-pear.phar to enter the installation process.

The system will be installed locally or locally. Enter local and confirm with yes.

Next we will ask about the path. There are many options here. If you need to change some directories, enter the corresponding number. By default, press enter to continue.

Start installation. There may be some warnings in the middle, which can be ignored temporarily.

Next, you may receive a warning that the current PHP configuration file PHP. ini does not contain the pear directory. Then, ask if you want to change the configuration file and add it to the pear directory automatically. Enter y to confirm.

If you are careful, you can find that the path of the php. ini file has been changed.

The last part is included: first, the old pear version is found in the PHP root directory. BAT. in addition, the pear command is not included in the PATH environment variable. You need to add the PHP root directory to the path environment variable. Then, even if pear is successfully installed!

To add a path environment variable, follow these steps:

Open System Properties (you can press ALT and double-click "my computer" to open it), select the Advanced tab, and click "environment variable" below"

In the pop-up window, double-click "path" in the following system variables. In the pop-up editing box, add the PHP root directory (my directory is c: \ PHP) to the end of the variable value ), all the way to OK.

All the steps have been completed. For more information about pear, see its manual.

2009 lovelovelt. All rights reserved.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.