Install pear in PHP in Windows and pear. Under the Windows PHP install pear tutorial, pear tutorial because of the need to install PHPUnit, to install pear, most of the online tutorial is to double-click the go-pear.bat, however, the php installation pear tutorial and pear tutorial in the PHP folder I installed in Windows
Because you need to install PHPUnit, you need to install pear first, most of the online tutorials are to double-click the go-pear.bat, but I installed the php folder does not have this file.
After several searches, I finally found a solution. the solution is as follows:
1. download the following connected file to go-pear.phar
Http://pear.php.net/go-pear.phar
Put this file in the php Directory, because many folders and files will be generated after the next step.
2. execute php go-pear.phar
Run CMD as administrator because of UAC problems on Windows.
3. Enter all the way
The installation is complete!
For more details, visit pear's website:
Http://pear.php.net/manual/en/installation.getting.php
How to install Pear (php) in win7)
If you have installed php, run
Go-pear.bat
You can install pear.
For detailed steps, see the English prompt and select your parameters. You can also install all the way to Enter.
Supplement:
If a file is missing when you run php after installation, the php extension may be missing. the extension of php is not the same as that of pear.
Also, do not forget to modify php. ini like this:
Include_path = ".; c: \ php \ pear"
We recommend that you reinstall PHP and then install pear.
Install php pear
Install pear
--------------
Pear is a php extension and application library. it contains many useful classes. after php5.0 is installed, pear is not actually installed. the installation method is as follows:
1. double-click the go-pear.bat in the php directory.
2. enter some settings as Prompted. add the LAN gateway, for example, 192.168.0.1: 80/. pear uses this address to access the internet. if there is no proxy server, press enter.
3. you will be prompted to bind some packages to php and select y.
4. install the basic package and prompt that the installation is successful.
5. open the php. ini file in the windows directory and find the following:
; Unix: "/path1:/path2"
; Include_path = ".:/php/shortdes"
;
Windows: "path1; path2"
; Include_path = ".; c: phpincludes"
Remove the comment from the last line and change the following path to your pear path, for example:
Include_path = ".; c: phppear"
Save php. ini and restart apache.
---------------
Pear command help
---------------
You can find the pear. bat file in your php root directory. this is the command for managing pear. used in cmd, you need to set the environment variable path, or double-click the generated ev_xxx.reg file. Some of its command functions are as follows:
Installation:
Install a pear library from the network:
Pear install packagename
Download packages but not install:
Pear download packagename
Pear download-all
Install the downloaded package:
Pear install filename. tgz
List:
Currently, the pear library list is available on the pear website:
Pear remote-list
List installed packages:
Pear list
List the packages that can be upgraded:
Pear list-upgrades
Update (upgrade ):
Update package:
Pear upgrade packagename
Pear upgrade-all
Remove:
Delete the installed package:
Pear uninstall packagename
----------------
Install a new package
----------------
For example, you have downloaded a new package xxx.tgzfrom pear.php.net/package.
Copy it to the c: phppeargo-pear-bundle directory and enter:
Pear install xxx. tgz
Then, extract the related files to the directory corresponding to c: phppear.
---------------
Instance
---------------
Under ...... the remaining full text>
Pipeline because you need to install PHPUnit, to install pear first, most of the online tutorials are to double-click the go-pear.bat, but I installed the php folder...