I want to install PHP PEAR on Windows non-interactively.
If I just download http://pear.php.net/install-pear-nozlib.phar and run it like this:
php install-pear-nozlib.phar
It gets installed into C:\php
.
But my PHP is installed into C:\PHP5
(and it is in the %PATH%
).
So I want to somehow install PEAR into C:\PHP5
, but can't find a way to do it.
What way of installing PEAR do you recommend in my situation?
I was able to achieve my goal by automating the interactive PEAR installer using the expect port for Windows.
Here is the
install_pear.tcl
script I created:The commented-out lines might be required, depending on how you run the script.
The script needs to be run from the required target directory, in my case it's the PHP root directory,
C:\PHP5
:You may also want to look at the ActiveTCL unattended installation.