PEAR is an abbreviation for the PHP extension and application Library (the PHP Extension and application Repository) . It is a code repository for PHP extensions and Applications .
To put it simply,PEAR to PHP is like CPAN (Comprehensive perl Archive Network) to Perl.
Simply put is the code repository that we can use. Some cloud programmers are lazy. In fact, the fundamental meaning is to tell us that sometimes not every technical detail must be our own realization, and pear is to let us stand on the shoulders of giants, can directly learn from or use other people have realized the mature code or ideas, so also reduce the possibility of detours, And the code that has been practiced is much safer and more efficient than the re-development.
Below, let's talk about < How to install pear under Windows? >
Installation steps
1. First, if you have not set up your own PHP environment, for convenience, you can use the Integrated PHP environment tool XAMMP in the native installation.
Installation Reference article: **[the road of marketing planning]001. Environment Construction (XAMPP+weiphp) * *
2. If you are installing using xampp , you can omit the following steps (just make sure that the 5th step is OK). If you are installing a PHP environment manually, keep looking:)
After you install PHP, you will see a go-pear.bat Windows batch file in the PHP root directory. Click on Execute, the prompt appears:
Is you installing a system-wide PEAR or a local copy?
(system|local) [System]:
Press ENTER to continue ... A list of Pear directory settings appears:
Below is a suggested the file layout for your new PEAR installation. to
Change individual locations, type the number in front of the
directory. Type ' All ' to change all of them or simply press Enter to
accept these locations.
1. Installation Base ($prefix)
2. Temporary directory for processing
3. Temporary Directory for downloads
4. Binaries directory
5. PHP Code directory ($php _dir)
6. Documentation Directory
7. Data Directory
8. User-modifiable Configuration Files Directory
9. Public Web Files Directory
ten. Tests directory
Name of configuration file
Path to CLI php.exe
1-12, ' all ' or ENTER to continue: (Can be set here by entering the project number of the directory path you want to change)
3. Make sure that the Internet network is working properly, download the necessary packages, script to start the installation ...
Beginning Install ...
Configuration written to E:\php5\pear.ini ...
Initialized Registry ...
Preparing to install ...
Installing Phar://go-pear.phar/pear/go-pear-tarballs/archive_tar-1.3.7.tar ...
Installing Phar://go-pear.phar/pear/go-pear-tarballs/console_getopt-1.3.0.tar ...
Installing Phar://go-pear.phar/pear/go-pear-tarballs/pear-1.9.4.tar ...
Installing Phar://go-pear.phar/pear/go-pear-tarballs/structures_graph-1.0.4.tar ...
Installing Phar://go-pear.phar/pear/go-pear-tarballs/xml_util-1.2.1.tar ...
Install ok:channel://pear.php.net/archive_tar-1.3.7
Install ok:channel://pear.php.net/console_getopt-1.3.0
Install ok:channel://pear.php.net/structures_graph-1.0.4
Install ok:channel://pear.php.net/xml_util-1.2.1
Install ok:channel://pear.php.net/pear-1.9.4
pear:optional feature Webinstaller available (PEAR ' s web-based installer)
pear:optional feature Gtkinstaller available (PEAR ' s php-gtk-based installer)
pear:optional feature Gtk2installer available (PEAR ' s php-gtk2-based installer)
pear:to Install optional features use "PEAR Install Pear/pear#featurename"
(some words are omitted here ...)
Then, to ensure that pear is found under the cmd command line. You need to register a pear path in the system environment variable. There is also a simple way, after installing the PEAR, in the PHP directory will have a pear_env.reg file, click to register environment variables.
4. At this time, you can see in the PHP directory of the establishment of a number of pear of the relevant directory, and then according to the official requirements should be updated in a timely manner pear,Http://pear.php.net/go-pear.phar
Download a Phar file, put it in the PHP root directory, and then enter the PHP directory on the cmd command line to execute:
PHP Go-pear.phar
5. Support Pear Package Manager has been installed, you can enter pear at cmd command line, the Help document of Pear command will appear. In order to suggest whether the installation was successful, you can create a PHP script in the Web directory:
<? PHP require_once ' system.php '; var_dump(class_existsfalse));? >
If successful, you should enter bool (true).
Note: If it does not appear and the PHP error indicates that the system.php file cannot be found, it is because the Pear code base path is not added to PHP's incude path. We go to php.ini configuration file include_path Set the path of pear.
At this point, the installation pear has been successfully completed!
Install the code package (plug-in)
The following explains how to install the code package. The following is an example of installing the log code package.
Execute under CMD command line
$ Pear Install log
If the network is not a problem, you can see a new log directory in the Pear code base pear Directory, which is the log code package directory, you can go to see there are already a lot of PHP files available for us to use.
Note: We can customize the configuration of our Pear Package Manager by executing pear config-set "Configuration item Name" "New configuration Value"
This site article is for baby bus SD. Team Original, reproduced must be clearly noted: (the author's official website: Baby bus )
Reprinted from "Baby bus Superdo Team" original link: http://www.cnblogs.com/superdo/p/4677615.html
[PHP Plugin tutorial]001.pear Package Manager