PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR » Bug #6245

"Silent" PEAR installation

Details

Submitted2005-12-14 18:10 UTC
Frominfo at e-novative dot de
Assignedcellog
StatusBogus
PackagePEAR
PHP Version5.1.1
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-12-14 18:10 UTC] info at e-novative dot de

Description:
------------
I am trying to install PEAR silently; that is, without user interaction. To me it seems that there is currently no possiblity of doing this.

It would be a great to automatically deploy PHP with PEAR if the PEAR installer could be changed to support this. Would it be possible to add a "silent" switch to the PEAR installer that would just skip asking questions and install PEAR with default values? This would allow for fully automated deployment of PHP with PEAR.

[2005-12-15 00:38 UTC] info at e-novative dot de

@cellog: yes, install-pear-nozlib.phar works silently, but installs to c:\php5 which is not what I want - I want to install PEAR inside my php directory. Is there a way to pass another installation path to the installer?

@pajoye: I don't agree with "it can't be done". Sorry if I failed to make my point clear. When I run go-pear, it basically calculates several values and asks me to confirm them. This requires me to hit enter twice. I cannot automate this (I have tried with echo piped to batch tricks, but didn't get this to work). My goal is a fully automated installation and configuration of PHP and PEAR. This would be possible by adding a switch like "go-pear system" and/or "go-pear silent" which skips asking the two questions, but installs PEAR using the calculated default values. To me, this has nothing to do with statically compiled values?

[2005-12-15 18:52 UTC] info at e-novative dot de

Greg, thanks for your help. It works - almost. Here's what happens:

I run "C:\Programme\e-novative\WAMP\php\php.exe" "C:\Programme\e-novative\WAMP\e-novative\install-pear-nozlib.phar" -d "C:\Programme\e-novative\WAMP\php\PEAR" -b "C:\Programme\e-novative\WAMP\php" --extreme-debug

The installer rather cowardly insists on putting php_bin=c:\php5\php.exe into pearsys.ini. Obviously this value also appears in the .bat files (PHP_PEAR_PHP_BIN) and in the environment variable of the same name. This is somehow strange since PHP_PEAR_BIN_DIR is set correctly.

When I manually patch pearsys.ini and the batch files and change the environment variable, the pear installation works just fine.

Another thing I noticed is that pearsys.ini contains chache_dir="c:\DOKUME~1\Steve\LOKALE~1\Temp\pear\cache". Since I do a system-wide installation of PEAR, it is probably not a good idea to use a certain user's Temp directory as the PEAR cache directory. I another user runs PEAR, he will probably not have access rights to my Temp dir. It might be better to use the Temp dir inside the Windows directory for system-wide PEAR installation.