I liked Chocolatey concept which had been talked at HN two weeks ago: “Kinda like apt-get, but for Windows”. But how much is it useful actually?
Let’s see it by getting PHP5.4 application work on Windows environment.
Setting Up PHP5.4 On Windows
- Download zipped PHP 5.4.XX binary
- Unzip them and rename the folder(assuming “C:\php54” is the folder name)
- Rename “C:\php54\php.ini-development” to “C:\php54\php.ini”
And lastly, edit C:\php54\php.ini and make following two extensions enable by trimming semicolon:
Don’t forget to set the PATH system variable from system settings. For example:
Getting Chocolatey And Composer Ready
Hit the command to get chocolatey ready:
C:\> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
Install curl, git and svn commands with chocolatey, as applications available on Composer often depend on them.
C:\> cinst curl C:\> cinst git C:\> cinst svn
Here You Go
C:\tmp> curl -s http://getcomposer.org/installer | php C:\tmp> php composer.phar create-project -s dev --dev bear/package ./bear C:\tmp> php .\bear\apps\Helloworld\public\min.php HelloWorld!
At this moment(Feb 17th, 2013), Installing PHP5.4 via cinst failed due to 404 error:
C:\> cinst curl php5-dev
Either cinst or php5-dev seems not maintainanced very well. I already commented this to the owner page of php5-dev.