Wrox Programmer Forums
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 9th, 2004, 01:52 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default What is PEAR?

what is the use of PEAR ?
how can i get it working with localhost IIS

i m using PHP Version 4.3.2
Server API CGI/FastCGI
i've a PEAR directory in c:/php4/includes/pear
whenever i enable it in php.ini, i get errors in my php applications e.g.,

Fatal error: main(): Failed opening required 'mainfile.php' (include_path='C:\php4\includes\pear\') in C:\Inetpub\wwwroot\nuke\html\includes\counter.php on line 25

other examples of error:

Fatal error: main(): Failed opening required 'PEAR.php' (include_path='.;../phpwebsite\lib\pear\') in C:\Inetpub\wwwroot\phpwebsite\lib\pear\HTML\Templa te\IT.php on line 22

Warning: main(): Failed opening '/path/to/xoops/directory/include/common.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\xoops\html\mainfile.php on line 60
__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old August 9th, 2004, 11:40 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

PEAR is a repository for high quality PHP scripts, and its also an installer. To install PEAR you open the command line Start->Run->cmd

Navigate to the PHP directory and at the command line execute the go-pear.php file. The command might look something like this.

C:\PHP>PHP go-pear.php

Where you are passing the go-pear.php file as an argumnet to php.exe. You may need to include the full file path of both files.

Then the installer will ask you a series of configuration questions while it installs PEAR and a subset of the most used PEAR packages.

Afterwards you can install PEAR packages from the command line.

C:\PHP\PEAR>pear install Mail_IMAP

The pear.bat file can be passed simple arguments for package maintanance, here the installer will automatically install the Mail_IMAP package and all of its components. Again you might have to include the full file path to the .bat file if you want to execute pear commands without navigating to the PEAR directory.

C:\PHP\PEAR>pear help

The help command lists all of the available options, some of which being install/upgrade/uninstall

The PEAR installer also updates the include_path directive of php.ini with a reference to the PEAR directory, this allows you to reference PEAR scripts from any directory.

Does that make sense?

You can also read more in the PEAR manual at http://pear.php.net.

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using PEAR spraveens Beginning PHP 1 December 3rd, 2006 02:07 AM
Pear functions is not working vinodkalpaka Pro PHP 2 August 5th, 2005 12:56 AM
PEAR::Auth and PEAR::Auth_HTTP Ceriwaen Beginning PHP 1 February 18th, 2005 04:36 PM
PEAR philip.painter@hp.com PHP How-To 1 June 6th, 2003 09:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.