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.
- Download PHP 5.4 from php.net here (you want to download the VC9 x86 thread safe zip)
- Extract the downloaded zip to c:\php
- In your favorite browser go to http://pear.php.net/go-pear.phar to download go-pear.phar
- Move go-pear.phar from your download directory to c:\php
- Rename the file php.ini-development or php.ini-production to php.ini in the directory c:\php
- 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. - Open a command prompt with administrative permissions (go to, all programs –> accessories and right-click command prompt and select “run as administrator”)
- Go to the php directory
cd c:\php
- Beginning the PEAR install
php go-pear.phar
- Select system for the install type (it’s the default, so you can just press enter)
- 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 - After the install has finished run c:\php\PEAR_ENV.reg to finish the installation
Installing PHP Codsniffer
- Open a command prompt with administrative rights
- Go to the PHP install directory
cd c:\php
- Install PHP Codesniffer
pear install PHP_CodeSniffer