Home > Backend Development > PHP Tutorial > PHP installation pear tutorial under Windows, pear tutorial_PHP tutorial

PHP installation pear tutorial under Windows, pear tutorial_PHP tutorial

WBOY
Release: 2016-07-13 10:16:04
Original
1072 people have browsed it

Pear installation tutorial for PHP under Windows, pear tutorial

Because you need to install PHPUnit, you need to install pear first. Most online tutorials start by double-clicking go-pear.bat, but there is no such file in the php folder I installed.

After several searches, I finally found a solution. The solution steps are as follows:

1. Download the file linked below to go-pear.phar

http://pear.php.net/go-pear.phar

It is best to put this file in the php directory, because after the next step is executed, many folders and files will be generated.

2. Execute php go-pear.phar

When executing on Windows, you need to run CMD with administrator privileges due to UAC issues.

3. Enter all the way

The installation is complete and you’re done!

More detailed information can be obtained on pear’s website:

http://pear.php.net/manual/en/installation.getting.php

How to install Pear(php) under win7

If you have installed php, execute
go-pear.bat
to install pear.
For specific steps, please read the English prompts and select your parameters. All the way Enter can also be installed successfully.

Supplement:
If you are prompted for missing files when running php after installation, it may be that the php extension is missing. The php extension and pear are not the same thing.

Also, don’t forget to modify php.ini, like this:
include_path = ".;c:\php\pear"

It is recommended to reinstall PHP and then install pear .

php pear installation

Install pear
-------------
pear is an extension and application library of PHP, which contains many useful classes. After installing PHP5.0, pear It is not actually installed. The installation method is as follows:
1. Double-click go-pear.bat in the php directory.
2. Follow the prompts to enter some setting information, mainly to add the gateway of the LAN, such as 192.168.0.1:80/, pear needs to use this address to access the Internet, if there is no proxy server, just press Enter
3 . Then you will be prompted to bind some packages to php, select y.
4. Then install the basic package and prompt that the installation is successful, it’s that simple.
5. Open the php.ini file in the windows directory, and then find the following location:
; unix: "/path1:/path2"
;include_path = ".:/php/includes"
;
; windows: "path1;path2"
;include_path = ".;c:phpincludes"

Remove the comment on the last line, and then change the following path to your pear path , for example:
include_path = ".;c:phppear"
Save php.ini, and then restart apache.

--------------
pear command help
--------------
In your The pear.bat file can be found in the PHP root directory. This is the command to manage pear. Use it in cmd to set the environment variable path, or double-click the generated ev_xxx.reg file. Some of its command functions are as follows:

Install:

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 on the pear website List of all available pear libraries:
pear remote-list

List of installed packages:
pear list

List of 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 new package
------ ----------
For example, you downloaded the new package xxx.tgz from pear.php.net/package/.
Copy it to the c:phppeargo-pear-bundle directory, and then enter in cmd:
pear install xxx.tgz
That’s it. The relevant files are decompressed to the directory corresponding to c:phppear.

--------------
Example
---------------
Next... ...The rest of the text>>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/899060.htmlTechArticlePear tutorial for installing PHP under Windows. The pear tutorial requires installing PHPUnit, so you need to install pear first. There are many online tutorials Most people start by double-clicking go-pear.bat, but in the php folder I installed...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template