Method of successfully installing pear under win _win server

Source: Internet
Author: User
Tags pear

I used the WAMP2.1 in the installation of the Pear times wrong, toss a few finally put pear to put up, first look at a newspaper error:

According to the information on the Internet, it is said to run the Go-pear.bat batch file of the PHP directory under the WAMP installation directory for installation. The WAMPSERVER2.1 version of the Pear directory has a slightly different location (refer to the highlighted section of my diagram). This error occurs after the operation, indicating that the installation failed.

The solution is to run the following statement

Copy Code code as follows:

e:\wamp\bin\php\php5.3.3>php-d phar.require_hash=0 Pear/go-pear.phar

If the successful run will be shown in the following figure

Figure 1: Install the statement that Pear needs to run

Figure 2: Return to the

Figure 3: Continue to enter

Would show a bunch of English, and then there came out a

Ask if you can modify the php.ini file, enter Y to continue carriage return

The last line prompts enter to continue, at which time the entire installation process is completed (that is, the way of carriage return)

After you install pear, you will install several pear PACKAGE by default, and enter the Pear list display PACKAGE

Figure 1: List all installed pear packages

Figure 2: Install Mail class

Mark 3:mail Class Installation success (highlighted)

Tell PHP about your pear installation directory

Modify the Include_path in php.ini to the Pear installation directory

Copy Code code as follows:


; Paths and directories;


; UNIX: "/path1:/path2"
; include_path = ".:/ Php/includes "

; Windows: "\path1;\path2"
include_path = ".; C:\php\includes "

The last row is modified to the installation directory of your own pear

include_path = ".; E:\wamp\bin\php\php5.3.3\PEAR "

Restart Wamp, create a new PHP file, and then run the following statement if no error indicates that the installation has succeeded (provided that there is no mail.php file name in the directory under Run)
Copy Code code as follows:

<?php
Require_once ("mail.php");
?>

Query pear package and installation commands can access the Pear official website http://pear.php.net/index.php

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.