Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Zend Framework 2 on XAMPP in Windows

Tags:

I know this question may have appeared few times here and in the internet. But still I feel it is not clear for somebody who wanted to enter into the world of frameworks. I have followed these links Rob Allens Tutorial, ZF Quick Tutorial.

But some how I feel it is not quite clear with the installation part. I have a windows system basically Vista with the newest version of XAMPP installed. I have downloaded the latest version of ZFSkeletonApplication from this link ZFSkeletonApp, extracted the skeleton contents, renamed the folder to zendframework and moved it to xampp folder i.e now ZF skeleton is in c:\xampp\zendframework.

So until here everything seems clear and easy, from here I am some how lost with the configurations. Can some one elaborate the things from here how to install the Zf and make it work, like changes in the include paths, .htaccess files and so on. Please do remember that I have windows with XAMPP on it. If some one can guide me exactly for this set up, it would be helpful.

P.S. It would be good if one can provide info about the changes which I need to make with examples consisting of paths, so that I am not lost, for example like you can find .htaccess file here(ex pathname), changes in .htaccess file should be so and so.

Thanks

like image 651
125369 Avatar asked Jul 19 '12 14:07

125369


2 Answers

For future references, i also made a big post on how to install ZF2 on a windows xampp environment right here Install ZF2 on Windows Xampp

OK, i have done this on multiple systems now. For a home system the following steps work quite well:

  • Download msysGit and install it to any directory
  • Run the git-cmd.bat from the msysGit-Folder
  • Move into the directory you want i.e. C:\xampp\htdocs\ (this is done via cd dirname or cd .. to go up a level, change partition with D: and hit enter)

Run the following command. The <OptionalFolderName> would be the name of a Sub-Directory of htdocs, if you skip this, the folder will get named ZendSkeletonApplication

git clone git://github.com/zendframework/ZendSkeletonApplication.git <OptionalFolderName>

Possible Trouble Scenario (fatal:unable to connect to github.com)

Once again at workplaces, pretty often the default port (9418) for the git-protocol is blocked. If this is the case for you, then you should try one of the following Commands

git clone https://github.com/zendframework/ZendSkeletonApplication.git <OptionalFolderName>
git clone [email protected]:zendframework/ZendSkeletonApplication.git <OptionalFolderName>

Now you are not done yet. The skeleton Application is installed, but the framework is still missing, here some people might run into the first problems, but this actually is quite easy.

We're still at the command line interface

  • cd <OptionalFolderName> or cd ZendSkeletonApplication depending on what you did earlier
  • php composer.phar self-update
  • php composer.phar install (this might take a while)

So, this is the part where lots of things can happen. I have two scenarios happened to me:

Scenario #1 No directory write permissions

This is easily handled by running the command line interface with administrator privileges

Scenario #2 Working behind a router (i.e. at work)

Personally i didn't have to do much to get this working, but the line might change depending on your proxy. Personally i did the following at the command line interface

  • SET HTTP_PROXY=http://proxy.domain.tld:8080 you might also be good with
  • SET HTTP_PROXY=proxy.domain.tld:8080 don't ask me why, but i needed the http://

With all those done, you should have an almost running ZendSkeletonApplication. The other part is how to set up your virtual host, but i won't go into detail on this, as that's even ZF1 Stuff and everyone should be familiar with that by now, if not, there's good resources to learn out there.

I hope i could be of help to you.

like image 98
Sam Avatar answered Oct 02 '22 14:10

Sam


Setbacks have to install in Windows, but I ended up finding a solution. From ZF2 to install on windows via git, for this is the only use that simulates msysGit git linux on windows, for it is only access the tutorial: http://zf2.com.br/tutoriais/post/instalando-o-git-no-windows-para-fazer-a-instalacao-do-zf2-somente-no-comando-do-windows-via-composer

like image 42
Jaime Marcelo Valasek Avatar answered Oct 02 '22 15:10

Jaime Marcelo Valasek