Page 1 of 1

How to use PEAR in XAMPP?

PostPosted: 28. September 2008 12:42
by random1
How do you install PEAR modules on XAMPP for Windows?

This is an important ability but doesn't seem to work.

PostPosted: 28. September 2008 13:23
by Wiedmann
How do you install PEAR modules on XAMPP for Windows?

Should be "pear install packagename".

PostPosted: 29. September 2008 01:27
by random1
When I try that I get:

'pear' is not recognized as an internal or external command,
operable program or batch file.

is there a step after install of XAMPP to get get PEAR activated?

PostPosted: 29. September 2008 06:45
by Wiedmann
'pear' is not recognized as an internal or external command,
operable program or batch file.

The "pear" command is in the directory "\xampp\php". So you have to go to this dir with "cd \xampp\php" before executing "pear install ...".

PostPosted: 01. October 2008 00:40
by random1
Hmm... does not work.

I get

Image

In the folder "C:\xampp\php" there is no pear.exe file.

There is a .bat files "go-pear.bat" that may need to be used?

Any more suggestions?

PostPosted: 01. October 2008 07:40
by Wiedmann
In the folder "C:\xampp\php" there is no pear.exe file.

The file in question is "pear.bat". (not "go-pear.bat")

PostPosted: 01. October 2008 09:12
by ospx
I had had some problems launching pear too some time ago. I've used the portable version of xampp for/at windows xp.

portable version of xampp means: I downloaded the zip file, extracted it to the root of a partition and started xampp without to start initially setup.bat.

Xampp and its components (e.g. Apache, Mysql, PHP etc worked fine) but not pear at the commandline, so I made some investigations in this issue.

if you don't launch the setup.bat of xampp at the install process, in every importend configuration files are the absolute path uncompleted. In fact, the leadinding drive letter of the partition in all paths are missing.
[
for instance: a part of the pear.ini file:

working example:

... s:12:"download_dir";s:22:"G:\xampp\pear\download";s:8:"test_dir";s:25:"G:\xampp\htdocs\pear\test";s:8:"data_dir";s:18:"G:\xampp\pear\data" ..."


example broken paths in pear.ini before:

...s:7:"bin_dir";s:12:"\xampp\php";s:7:"php_dir";s:17:"\xampp\php\pear";s:7:"doc_dir";s:22:"\xampp\php\pear\docs" ...


The main components of xampp works very well with this restriction, pear does not.

I'm unsure, but I think, the the php-cli.exe, which uses broken paths from the C:\xampp\php\php.ini also doesn't work with broken paths (try C:\xampp\php>php -v I guess, it will fail).

This is, if I'm right, an restriction to the portable xampp at windows. You can't use pear with the poor unpacked xampp.

You have to configure xampp with absolute and full paths, to use pear. So you lost the ability, to use your xampp at a transportable Drive (Stick/ Hdd) at different windows systems.
Correct me, if what I wrote is false. But this was the only way for me to run pear. There is also a german discussion about the problem at :
http://pearforum.de/viewtopic.php?t=2213

( Bei der Beschreibung der Konfigurationsdateien sind mir dort allerdings in der Eile des Posts Fehler unterlaufen. Es sind in diesem Fall nur die Konfigurationsdateien \xampp\php\php.ini und \xampp\php\pear.ini relevant, um pear auf der Kommandozeile zum laufen zu kriegen.)

Re: How to use PEAR in XAMPP?

PostPosted: 16. February 2009 15:50
by tgoshinski
I ran go-pear.bat from the command line, and it ran a setup program to configure my system for PEAR.

When it was finished I was left with some new folders and a pear.bat file. I tested it with "pear install -f Text_CAPTCHA" and everything seemed to work.