Tuesday, 6 December 2011

Setting a Dev env on Windows 7 (WAMP/Zend 1.11.11/PEAR/UNITEST/...)

1. Download and install WAMP (in my case I am using WAMP 2.2/PHP 5.3.8)

2. Download and install Zend 
I've created c:\wamp\lib and decompressed my zend ZIP file in there so that I had c:\wamp\lib\ZendFramework-1.11.11

Installing ZendFramework with WAMP 2.2, ref. link:

http://www.lametadesign.com/blog/admin/how-install-zend-framework-using-wamp-20-windows-xp

3. Install Pear 
"Installed Pear in Wamp Server 2.2 (with php 5.3.8) for Windows", ref. links:
http://mynewtec.blogspot.com/2011/11/install-pear-in-wamp-server-22-with-php.html
http://stackoverflow.com/questions/8276682/wamp-2-2-install-pear


4. Install PHPUnit
It would fail on running: pear config-set auto_discover 1 saying it could not find c:\windows\pear.ini. I run CMD.exe as Admin and the command went through.

Them it would give an error on running:
  c:\wamp\bin\php\php5.3.8\pear> pear install pear.phpunit.de/PHPUnit
saying there were no Releases avaliable for package "pear.phpunit.de/PHPUnit" so I did:

   c:\wamp\bin\php\php5.3.8\pear> pear clear-cache then,
   c:\wamp\bin\php\php5.3.8\pear> pear install -a -f phpunit/PHPUnit


PHPUnitest installed! Ref. link:
http://stackoverflow.com/questions/6272264/windows-installing-phpunit-via-pear-installing-phpunit-via-pear

5. INSTALLING Grapviz
 
Downloaded and install http://www.graphviz.org/Download_windows.php and added to $PATH. For Win 7 all the pear files and the files they use cannot have a space in their path location so you can't install graphViz in "program files". I installed mine in

   C:\wamp\apps\Graphviz 2.28\

6. INSTALLING DocBlox

DocBlox is a smart replacement for the old slow PHPDocumentor. Besides being used by the Zend Framework it uses largely the same command line options as phpdoc, so it can act as a drop in replacement if you already have existing build scripts utilising phpdoc. DocBlox has a number of dependencies so make sure to install everything right beforehand. On my case I just did:

   c:\wamp\bin\php\php5.3.8\pear> pear channel-discover pear.docblox-project.org

   c:\wamp\bin\php\php5.3.8\pear> pear install --force docblox/docblox

Make sure you are using Windows Powershell or cmd.exe as Admin when running the command line arguments necessary for the installation of all programs and modules. Normally have to manually add their paths. Make sure that on your Windows Path you have something similar to:

  C:\wamp\bin\php\php5.3.8; C:\wamp\bin\php\php5.3.8\pear; C:\wamp\bin\mysql\mysql5.5.16\bin; C:\wamp\lib\ZendFramework-1.11.11\bin;
 
During PHPUnit installation, when running pear install pear.phpunit.de/PHPUnit, if you get a error saying there were no Releases avaliable for package "pear.phpunit.de/PHPUnit" you should use:

   c:\wamp\bin\php\php5.3.8\pear> pear clear-cache
   c:\wamp\bin\php\php5.3.8\pear> pear install -a -f phpunit/PHPUnit

No comments:

Post a Comment