The first major release of Zend Framework was Zend Framework 1 and as at the time of this tutorials the next version of Zend Framework, which is Zend Framework 3 was already near completion.
So this would be our first
time to use the git that we earlier installed to run on command line. If you
have not done that see this tutorial.
Start windows command line
and change your directory to where your file would be store in xampp like
this:-
cd c:/
cd xampp/htdocsOnce you are in this directory in command line run the git command below:-
git clone git://github.com/zendframework/ZendSkeletonApplication.git
If your installation of git
for command line was successful this should start downloading the ZendSkeletonApplication.
You must have noticed the word clone in the above git command, it is a git
jargon for download.
Once the download progress
hit the 100% mark open the folder and rename the folder with the name “ZendSkeletonApplication”
to “zfnigeria” being the website we want to create. Remember the folder is in
your xampp htdocs folder and you can find it in the following directory. C:\\xampp\htdocs.
Assuming you have closed your
window’s command line start it again and change the directory to the htdocs
folder as described above and this time don’t close it. Then further move it
into the zfnigeria folder like this:-
cd zfnigeria.
Now if you go to your browser
and try to access the site like this http://localhost/zfnigeria/public
it would result to error because as at this point not all the files required by
zf2 have been downloaded. We would need to use composer to download whatever
other files that are remaining.
Composer is another PHP tool
which is used for the management of dependencies. It is simple to understand, a
configuration file in your application that you can add all the code for the
dependency files. In the case of Zf2 you can find this configuration file named
composer.json in the zfnigeria root directory. We would come back to this file
but let us continue with the installation.
Maximize your command window,
remember I said don’t close it the other time. Now from where we stop in the
windows command line before, run the following php commands one after the other.
php composer.phar self-update
php composer.phar install
At the progress mark of 100%
all the dependencies files would have been successfully installed to enable us
first access our website. From your browser load this address again http://localhost/zfnigeria/public.
You should see the screen below if you have follow the steps illustrated in
this tutorial.
We have successfully
installed Zf2, next we would look at:-
·
Configuring the document root of our server to enable us view our
website at http://localhost.
·
A brief description of the structure of Zf2
·
Creating the look and feel of our website from the template we have.


No comments:
Post a Comment