Total Pageviews

Saturday, 23 November 2013

Installing PHP PEAR in Wamp Server

This is just a reminder post, and a tutorial for people who want to install the PHP PEAR packages in wamp server. First thing's first download GOPEAR which is a php archived version of the PEAR installer that we will use to install any packages. Save this file to your wamp installations php binary directory (which for me is C:\opt\wamp\bin\php\php5.3.13).
now open a command prompt as an administrator (right click on cmd.exe and choose "run as administrator") and type the following commands
php go-pear.phar
choose system for a system wide installation. When the program prompts you with a list, just press enter to accept the defaults. After the download has finished a file called PEAR_ENV.reg will be created. This file contains environment variables for PEAR. Just double click it and install the registry file. Now open the file C:\opt\wamp\bin\php\php5.3.13\php.ini and add the following
include_path = ".;C:\opt\wamp\bin\php\php5.3.13"
Don't forget to replace the path with your own installation directory. Add the same line to the file C:\opt\wamp\bin\apache\apache2.2.22\bin\php.ini and restart apache. Now you can use the file pear.bat in C:\opt\wamp\bin\php\php5.3.13 to install any packages. E.g
pear.bat install net_smtp
That's all there is to it really...

from  http://labs.dendiz.com/blogengine/post/1/installing-php-pear-in-wamp-server-for-windows