问题
All the guides for installing PEAR on wampserver, such as the Symfony guide, say I am to run a go-pear.bat script within some PEAR directory.
I am on wampserver 2.1 and there is no PEAR directory and no go-pear batch script to be found.
Is this just different because I have a newer version? Is there somewhere I can download these missing installation scripts?
回答1:
It's not installed per default on all setups.
But you can download the plain go-pear script for that: http://pear.php.net/go-pear
Either invoke it with php.exe go-pear
or run it through your webserver as regular .php script. (It has a nice installation GUI!)
回答2:
Rather new to pear myself, but my answer to a similar question: Running Wampserver 2.2 on Win7 Professional 64bit working with PHP 5.3.8 I have found a few issues with standard way of installing with go-pear. I downloaded the go-pear.phar and ran that via cmd with no deprecated errors etc.
回答3:
you could also just go to the pear site, download the zips and unzip them in the correct local folders (wamp/bin/php)
we've just solved a similar problem like this, where a copy of a live site set up on a local machine was hitting errors because PEAR was not installed. The installation process was hitting errors so we just downloaded and unzipped PEAR and the required modules directly into the correct directory.
problem solved.
回答4:
Firts export in the PATH
system, add you folder with php, p.e. if you have php 5.4.x in your wamp system:
PATH=...;C:\wamp\bin\php\php5.4.x;
Create a new folder p.e.:
C:\wamp\bin\php\pear\
If your php version is 5.3 or or newer you can use pyrus.phar.
Using pyrus.phar to install pear
php pyrus.phar install pear/PEAR-1.9.4
Export you PATH
again:
PATH=....;C:\wamp\bin\php\pear;
you can use pear.bat, or pear.
pear.bat <arguments>
Check: for more information:
- http://pear.php.net/manual/en/installationpyrus.introduction.php
- http://pear2.php.net/
回答5:
This worked for me on windows 7:
http://www.steptoinstall.com/install-pear-wamp-server-windows-7-8.html
NOTE: Make sure you open command prompt window in administration mode.
回答6:
I downloaded the 32bit wamp and this includes the pear files. However it is best to install 1.9.2 by downloading go-pear.phar
manually, as the default one didn't seem to work.
来源:https://stackoverflow.com/questions/5796554/installing-pear-on-wampserver