Installing Zend Framework 2 on XAMPP in Windows

后端 未结 4 860
逝去的感伤
逝去的感伤 2020-12-04 20:06

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

4条回答
  •  情深已故
    2020-12-04 20:52

    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 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 
    

    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 
    git clone git@github.com:zendframework/ZendSkeletonApplication.git 
    

    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 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.

提交回复
热议问题