Monday, March 14, 2011

Installing PEAR on WAMP Windows

When you installed the WAMP search for the file "go-pear.bat". Normally the file is located in C:\wamp\bin\php\php5.3.5 but depending on version of WAMP. I'm now using WAMP 2.1e which supports PHP5.3.5. Go to the folder and run the file as administrator.

If you get this type of error, don't worry

phar "C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar" does not have a signaturePHP W
arning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\
wamp\bin\php\php5.3.5\PEAR\go-pear.phar on line 1236
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar:0

Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\
wamp\bin\php\php5.3.5\PEAR\go-pear.phar on line 1236

Call Stack:
0.0117 717744 1. {main}() C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar:0


Press any key to continue . . .

Open Command prompt that go to the folder C:\wamp\bin\php\php5.3.5\PEAR and type "php -d phar.require_hash=0 go-pear.phar" . Make sure you have set the PHP Environment.

If you don't set the PHP environment, type "php -d phar.require_hash=0 PEAR\go-pear.phar" from the folder C:\wamp\bin\php\php5.3.5\

The just press ENTER to accept default setup.

Setting CakePHP on WAMP Server

Setting CakePHP on WAMP Server is very easy. Follow the following steps:-

  1. Configure Apache WAPM Server
  2. Open Apache httpd.conf configuration
  3. Search for #LoadModule rewrite_module modules/mod_rewrite.so
  4. Remove the "#" and the line becomes LoadModule rewrite_module modules/mod_rewrite.so
  5. Go to directory setting and make it Allow from all
  6. Open php.ini file then search for "curl" and remove the ";" to enable extension=php_curl.dll
  7. Restart the WAMP Server.