Installing PEAR on wampserver
Asked Answered
G

7

19

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?

Gellman answered 26/4, 2011 at 21:16 Comment(0)
S
14

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!)

Saleswoman answered 26/4, 2011 at 21:23 Comment(3)
Seems to be in the 32bit WAMP.Gellman
in case if you use php version 5.4.+ than you need to get another script pear.php.net/go-pear.pharOfficiate
manifest cannot be larger than 100 MB in phar "C:\wamp64\bin\php\pyrus.phar"Antabuse
C
12

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.

Caraway answered 18/11, 2011 at 6:45 Comment(1)
The link i provided has some additional explanation of what to do. And provides and alternative to downloading the .phar file.Gariepy
W
1

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.

Worth answered 1/5, 2013 at 13:42 Comment(0)
S
1

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:

Scoggins answered 11/6, 2014 at 22:42 Comment(0)
A
1

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.

Alti answered 23/1, 2015 at 18:56 Comment(0)
D
0

How it worked for me is,

I went to the PEAR official site and clicked on this link which brings you to go-pear.phar source. Then I saved the file by right clicking on the web page, under my php7.4 ( this is the PHP version I have set on my ENV variables ) folder.

Next opened up the command line as admin and did CD to that folder and ran the following command php go-pear.phar.

This started the PEAR installation process and asked few questions. At the end I was asked to double click on "PEAR_ENV" reg file which was inside the php folder and done.

Hope this will helpful for someone.

Disassembly answered 4/11, 2022 at 16:12 Comment(0)
S
0

Following the accepted answer in 2023 did not work for a couple of reasons.

  1. Downloading the file at https://pear.php.net/go-pear and running it didn't go smoothly (either with web interface or CLI).
Error -- Deprecated: Function ereg() is deprecated in C:\wamp64\www\dev\pear\index.php on line 1461
  1. Downloaded a more recent version of the pear installer, and was met another error
Error -- manifest cannot be larger than 100 MB in phar "C:\wamp64\www\dev\pear\index.php"

because of some character encoding issue.

Here's what worked:

  1. Use the CLI to download the file -- cd C:\path\of\choice e.g.
cd C:\wamp64\bin\php\php5.6.40
curl -OL http://pear.php.net/go-pear.phar
  1. Once downloaded, execute it
php -d phar.require_hash=0 go-pear.phar
  1. Follow the default prompts.

  2. In the final step of installation make sure to allow the pear installer edit the php.ini to include the pear directory Or you may do it manually. At the bottom of your php.ini include_path=".;C:\wamp64\bin\php\php5.6.40\pear" or search "include_path" uncomment (by removing the sarting ';') and edit in-between the quotes.

  3. Here's the very important part if you use wampserver apache has a separate php.ini, for me it is located at C:\wamp64\bin\apache\apacheX.XX.XX\bin You need to also edit it, and put the include_path like above

  4. Restart all wampserver services

BOOM!

Streak answered 1/4, 2023 at 19:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.