For anyone who’s using classes from the PEAR repository (and especially those who are not)
, the whole process of getting the latest classes and browsing the collection has now been simplified with the PEAR WebInstaller. This article sets out to describe the installation process, mainly for readers who aren’t aware of the rich library of functionality available.
Prerequisites
- windows – The installation process will be described for windows-based users, obviously Linux users have access to the same features and probably don’t need the tutorial
- PHP 4.2.3 – I’ve tried this with 4.1.2 and it didn’t work so I would recommend installing the latest version of PHP which can be downloaded from php.net and is very easy to configure
- a local webserver – I use apache but any webserver will do








December 30th, 2002 at 10:59 pm
Hello,
Getting Up and Running with the PEAR Web Installer
and then tried the instructions on the page above.
or press Enter to continue:”
distribution of PHP 4.3.0 (from PHP 4.2.3):
External extension (php_zlib.dll) has been removed.
(see changelog: http://www.php.net/ChangeLog-4.php)
“go-pear.php” script? (see lines 234 to 247 of “go-pear.php”).
This directory does NOT exist in PHP 4.3.0 ??
This isn’t mentioned in the changelog..????
with PHP 4.3.0 ? (ie. go-pear.php script changes etc.)
December 30th, 2002 at 11:01 pm
Hi Steve,
regarding your probs with 4.3.0, I haven’t installed this myself yet! But if you browse the pear mailing lists
- http://news.php.net/group.php?group=php.pear.general
- http://news.php.net/group.php?group=php.pear.dev
you’ll see you’re not the only one. Hopefully there are some clues here
February 13th, 2003 at 3:18 pm
This PEAR primer has some great ideas for using PEAR classes in a coherent application framework:
http://www.phpbuilder.com/columns/stump20021223.php3?page=2&print_mode=1
December 12th, 2003 at 11:04 pm
Great Article…
I was having trouble getting PEAR to install properly until I came across this article. The PEAR installation documentation was lacking at best.
Thanks!!!
December 13th, 2003 at 3:17 am
HELP!
After installing ZEND Studio, PEAR doesn’t seem to be working correctly.
Example: Get a PAGE NOT FOUND when attempting to go to http://localhost/PEAR/PEAR/WebInstaller.php
(YES- the file is there).
System Info:
Apache 2.0.48
PHP 4.3.4
Zend Studio 3.0.1 Plus (Server and IDE)
June 29th, 2004 at 9:21 am
I am having some problems getting Pear up and running.
I have the go-pear.php file in a go-pear folder on my web server address. Directory is such as D:\\web sites\\name of current site\\go-pear
PHP is installed at C:\\php
I execute go-pear.php and I get the page to start the set up. Above it all is this warning Warning: session_destroy(): Session object destruction failed in \"D:\\web sites\\current site\\go-pear\\go-pear.php on line 235\"
But I go ahead and select next it has the screen to select my paths for install. Here are my settings that it autofilled:
1. Installation prefix D:\\web sites\\A-3-10-04\\go-pear
2. Binaries directory $prefix
3. PHP code directory ($php_dir) $prefix/PEAR
4. Documentation base directory $php_dir\\docs
5. Data base directory $php_dir\\data
6. Tests base directory $php_dir\\tests
7. PEAR Installer cache directory $php_dir/cache
8. Cache TimeToLive 300
9. Filename of WebFrontend $prefix/index.php
10. php.exe path, optional (CLI command tools) c:/php/cli/php.exe
Now on this page the warning about the session is now gone but there are 2 more at the bottom. \"Warning: Unknown(): open(C:\\data\\server\\PHP\\sessiondata\\sess_7305e954dee6a63b06fe9aae82d80ac7, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\\data\\server\\PHP\\sessiondata) in Unknown on line 0\"
I press install and it runs through fine up until 70% and then it just hangs and goes no where. Those 2 warnings are still on the bottom of the page and here is the rest of info from it.
Installation in progress …
First bar is at 70 %
Second bar is at 100 % Downloading PHPUnit-1.0.1.tgz …
Starting installation …
mkdir failed: /C:
Loading zlib: ok
Downloading package: PEAR………….ok
Downloading package: Archive_Tar……ok
Downloading package: Console_Getopt….ok
Downloading package: XML_RPC……….ok
Downloading package: Pager…………ok
Downloading package: HTML_Template_IT….ok
Downloading package: Net_UserAgent_Detect….ok
Downloading package: PEAR_Frontend_Web….ok
Bootstrapping: PEAR……………….(remote) ok
Bootstrapping: Archive_Tar…………(remote) ok
Bootstrapping: Console_Getopt………(remote) ok
Downloading package: DB……………ok
Downloading package: Net_Socket…….ok
Downloading package: Net_SMTP………ok
Downloading package: Mail………….ok
Downloading package: XML_Parser…….ok
Downloading package: PHPUnit……….ok
Extracting installer………………
Warning: main(PEAR.php): failed to open stream: No such file or directory in D:\\web sites\\A-3-10-04\\go-pear\\Archive\\Tar.php on line 21
Fatal error: main(): Failed opening required \’PEAR.php\’ (include_path=\’/C:\\WINNT\\TEMP\\gop7CF.tmp\’) in D:\\web sites\\A-3-10-04\\go-pear\\Archive\\Tar.php on line 21
Warning: Unknown(): open(C:\\data\\server\\PHP\\sessiondata\\sess_7305e954dee6a63b06fe9aae82d80ac7, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\\data\\server\\PHP\\sessiondata) in Unknown on line 0
What is going on? Why will it not work? I have tried a few things but not work. Thanks for your help!
June 30th, 2004 at 2:06 am
Sounds like the main problem is you\’ve customised where you want session data stored, and the program is not finding this location. As a foolproof approach, you could remove your customised settings in php.ini for session.save_path, and just create an empty folder c:\\tmp, even another at d:\\tmp if problems persist.
The second problem is that your include path does not point to the PEAR libs, so edit your php.ini file and set include_path = c:\\where\\your\\pear\\libs\\are.
If your still stuck I recommend you forward your request to the pear-general mailing list, they get lots of questions like this.
cheers
demian
June 30th, 2004 at 10:04 am
Ok changing where the session data was fixed it all. Actually it wasn\’t changed, the folder c:/data/server/php/sessiondata purely did not exsist, I create that folder structure where php.ini pointed to and it fixed it. Thanks for the help!
September 5th, 2004 at 12:35 am
Well, I go as far as this, following the tutorial in PHPkitchen. But the install hangs at the point cited below. I have to ask – what’s the deal here!?? why the hanging on install? Been very tough to get support from the PEAR community, is this a bug?. Using win2k and Mozilla 1.8a. Please help.
Starting installation …
mkdir failed: /C:
Loading zlib: ok
Downloading package: PEAR………….ok
Downloading package: Archive_Tar……ok
Downloading package: Console_Getopt….ok
Downloading package: XML_RPC……….ok
Downloading package: Pager…………ok
Downloading package: HTML_Template_IT….ok
Downloading package: Net_UserAgent_Detect….ok
Downloading package: PEAR_Frontend_Web….ok
Bootstrapping: PEAR……………….(remote) ok
Bootstrapping: Archive_Tar…………(remote) ok
Bootstrapping: Console_Getopt………(remote) ok
Downloading package: DB……………ok
Downloading package: Net_Socket…….ok
Downloading package: Net_SMTP………ok
Downloading package: Mail………….ok
Downloading package: XML_Parser…….ok
Downloading package: PHPUnit……….ok
Extracting installer………………
and PEAR hangs indefinitely
September 5th, 2004 at 11:29 am
Lee’s problem was solved by double-clicking the go-pear.bat file. He arrived at the above problem by executing the script in a DOS shell.
March 1st, 2005 at 4:03 pm
Hallo — when I run the installer, this is the output I get:
Starting installation …
Loading zlib: ok
Downloading package: PEAR………….ok
Downloading package: Archive_Tar……ok
Downloading package: Console_Getopt….ok
Downloading package: XML_RPC……….ok
Downloading package: Pager…………ok
Downloading package: HTML_Template_IT….ok
Downloading package: Net_UserAgent_Detect….ok
Downloading package: PEAR_Frontend_Web….ok
Bootstrapping: PEAR……………….(remote) ok
Bootstrapping: Archive_Tar…………(remote) ok
Bootstrapping: Console_Getopt………(remote) ok
Downloading package: DB……………ok
Downloading package: Net_Socket…….ok
Downloading package: Net_SMTP………ok
Downloading package: Mail………….ok
Downloading package: XML_Parser…….ok
Downloading package: PHPUnit……….ok
Extracting installer………………ok
Fatal error: Call to undefined method PEAR::staticpusherrorhandling() in C:WINDOWSTempgop20.tmpPEARDownloader.php on line 258
Then, obviously, it does nothing more.
What can I do about this?
doug.
March 2nd, 2005 at 10:17 pm
Hi Doug, I know Greg, the PEAR package mgr developer, has been doing a lot of work on this lately, best is to send your request direct to the pear-general mailing list, you can get more info at pear.php.net
cheers
demian
June 20th, 2007 at 8:09 pm
When your PEAR installation appears to hang, or your package installations appear to hang, you may have a problem in your _jumpBlock method of Archive/Tar.php. I have provided a manual solution to this problem.
If one can’t use
go-pear.phar for any reason I have provided an alternative manual fix
for this problem http://www.asherwolf.com/projects/php/pear/index.html.
You can direct questions about this possible fix to me at asher AT
asherwolf DOT com.
October 14th, 2008 at 4:00 am
What the hell? This isn’t a tutorial; it’s a damned pre-requisites spec, and that’s nothing I can’t find on the blasted PEAR website.
October 18th, 2008 at 9:22 am
@Adam – apologies, seems like the original article got lost when I converted to WordPress – please see this Sitepoint article for comprehensive coverage of the subject: http://www.sitepoint.com/article/getting-started-with-pear/
March 18th, 2010 at 5:37 pm
How cojones can I install it?
March 18th, 2010 at 6:00 pm
download this file, and follow instructions at top:
http://pear.php.net/go-pear
March 22nd, 2010 at 1:58 pm
Thanks, but still doesn’t work