Hey guys, I spent quite a bit of time trying to find a proper way of how to install Zend Framework 2 on XAMPP. Here are my tips about how to tackle and get started with Zend Framework 2.
1) Go to C:\xampp\apache\conf\extra and modify httpd-vhosts.conf
Insert lines like:
<VirtualHost *:80>
ServerName zf.localhost
DocumentRoot C:\xampp\htdocs\zf\public
#ErrorLog “logs/dummy-host2.example.com-error.log”
#CustomLog “logs/dummy-host2.example.com-access.log” common
SetEnv APPLICATION_ENV “development”
<Directory C:\xampp\htdocs\zf\public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
2) Go to C:\Windows\System32\drivers\etc and modify the hosts file.
Since you are going to install Zend Framework on C:\xampp\htdocs\zf add the following line to the hosts file:
127.0.0.1 zf.localhost
* You must repeat steps 1 and 2 for every Zend Framework project, just like in Joomla!!!
3) Download the Zend Skeleton Application from http://framework.zend.com/manual/2.3/en/user-guide/skeleton-application.html
4) Go to C:\xampp\htdocs\zf and unzip the Zend Skeleton Application there
5) Open GitBash and go to C:\xampp\htdocs\zf and type the following three commands:
php composer.phar self-update
php composer.phar install
php composer.phar update
* As soon as you do that open the browser and write http://zf.localhost Remember: this is the name you added in the hosts file! (127.0.0.1 zf.localhost)
Excellent blog,
It’s very helpful to me
Thanks guy.
Its fine man
a bit more detail on step 5 would be useful… i had to google around to install composer and add php to my path before i could run the commands.
thanks for writing about zend installation. thank you very much.
Excellent blog,
It’s very helpful to me..Successfully install zendframwork2…
Thanks.
How to install zend framework version 2.4.0?
I will get back to you soon. Will check for 2.4.0. I think that the same principles will apply for it as well.
PA
Thanks very helpful. I want to change the host to my domain name. What should I do?
Have a look at Cloud Control, you can push your files there. https://www.cloudcontrol.com/ and also https://www.cloudcontrol.com/dev-center/guides/php/zend-2
For the last step when i type those commangs it says php command not found.
First of all thank you very much for this helpful article.
Below commands didn’t worked for me.
php composer.phar self-update
php composer.phar install
php composer.phar update
So,I changed them like below and it worked.
composer self-update
composer install
composer update
Hope this will same someones time.
First of all Thanks for your valuable post on zend installation. I follow all the steps. upto step 4 all is ok for me but from step 5: I use removing php as
composer self-update
composer install
composer update
and let me install