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