How to use PEAR in XAMPP?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to use PEAR in XAMPP?

Postby random1 » 28. September 2008 12:42

How do you install PEAR modules on XAMPP for Windows?

This is an important ability but doesn't seem to work.
random1
 
Posts: 27
Joined: 17. December 2007 07:31

Postby Wiedmann » 28. September 2008 13:23

How do you install PEAR modules on XAMPP for Windows?

Should be "pear install packagename".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby random1 » 29. September 2008 01:27

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?
random1
 
Posts: 27
Joined: 17. December 2007 07:31

Postby Wiedmann » 29. September 2008 06:45

'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 ...".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby random1 » 01. October 2008 00:40

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?
random1
 
Posts: 27
Joined: 17. December 2007 07:31

Postby Wiedmann » 01. October 2008 07:40

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

The file in question is "pear.bat". (not "go-pear.bat")
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby ospx » 01. October 2008 09:12

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.)
ospx
 
Posts: 7
Joined: 13. December 2006 19:24

Re: How to use PEAR in XAMPP?

Postby tgoshinski » 16. February 2009 15:50

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.
tgoshinski
 
Posts: 1
Joined: 16. February 2009 15:44


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests