524Part IIIAdvanced Features (Web hosting account) and TechniquesThe key executable of

524Part IIIAdvanced Features and TechniquesThe key executable of the PEAR Package Manager is pear. It resides in your PHP home direc- tory, alongside the PHP interpreter itself. Automatic package installationOnce you have PEAR installed and updated, you can install any package you ve downloaded. The generic syntax for doing an automatic installation of a package is this: pear install
In that syntax,
is the name of a PEAR package. All available packages are listed athttp://pear.php.net/packages.php. You can also run: pear remote-listto see what s available. Here s an example of installing the PEAR DB package via the automatic PEAR PackageManager method: C:PHP>pear install DBdownloading DB-1.5.0RC2.tgz … Starting to download DB-1.5.0RC2.tgz (68,128 bytes) ……………..done: 68,128 bytesinstall ok: DB 1.5.0RC2Automatic package removalUninstalling a package is just as easy as adding one. The generic syntax looks like this: pear uninstall
To uninstall the DB package, then, we d do this: C:PHP>pear uninstall DBUninstall ok: DBIf you re not sure what packages are installed locally, run the following command to find out: pear listSemi-automatic package installationIf, for some reason, you downloaded a PEAR package in the form of a .tgzfile, you can lateruse the PEAR Package Manager to install it, even if there s no connection to the Internet avail- able. You just point the pearcommand at the local file, as follows: pear install HTML_BBCodeParser-1.0.tgzUsing PEAR packages in your scriptsOnce you ve installed the PEAR modules you wish to use, you should make sure the locationis included in the include_pathvariable of your php.inifile. This location can be tricky it will probably be /usr/local/lib/phpon Unix servers and whatever you specified duringthe go-pearprocedure on a Windows server. Once you ve done that, you can include theselibraries from any PHP script with a normal include directive:
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision php5 hosting services

Leave a Reply