Installing PHP 5.4 and PEAR

PHP5.4 is pretty easy to install on windows.  Although it doesn’t have a self installing binary like some of the previous versions, the install is pretty straight forward.

  1. Download PHP 5.4 from here (you want to download the VC9 x86 thread safe zip)
  2. Extract the downloaded zip to c:\php
  3. In your favorite browser go to to download go-pear.phar
  4. Move go-pear.phar from your download directory to c:\php
  5. Rename the file php.ini-development or php.ini-production to php.ini in the directory c:\php
  6. Add php to the PATH environment variable, by appending ;c:\php to it
    note: If you’re not sure how to set the path variable in windows 7 this is a good guide.
  7. Open a command prompt with administrative permissions (go to, all programs –> accessories and right-click command prompt and select “run as administrator”)
  8. Go to the php directory
    cd c:\php
  9. Beginning the PEAR install
    php go-pear.phar
  10. Select system for the install type (it’s the default, so you can just press enter)
  11. Next you will be shown the paths that PEAR will use, you want to change number 11 to c:\php\pear.ini
    –>To do this type 11, press enter, then type c:\php\pear.ini
  12. After the install has finished run c:\php\PEAR_ENV.reg to finish the installation

Installing PHP Codsniffer

  1. Open a command prompt with administrative rights
  2. Go to the PHP install directory
    cd c:\php
  3. Install PHP Codesniffer
    pear install PHP_CodeSniffer