How to set up Zf2 (Zend Framework) in mamp server

Zend framework released their beta 2 version. I just planned to start work with that. Because I have seen lots of interesting features in zend framework . If you want to see more details about features then you may visit (http://framework.zend.com/wiki/display/ZFDEV2/Home)

So I start to create a project with ZF2.0 . But I faced few problem to see the welcome screen . So here I describe how quickly you can set up a zf project .

First let us know the requirement of ZF 2.0

Assumption:

I assume that you have an idea for the following things :

1. how to setup mamp .
2. how to create virtual host .

Requirement :

1. Php 5.3

Download :

https://github.com/zendframework/zf2

Setup on MAMP:

I just want to show how to set up on mamp . I assume that you already set up

1. Now open your php.ini file located under

/Applications/MAMP/conf/php5/php.ini

2. Search for include_path and add the location of your zend framework:

include_path = ".:/usr/lib/php:/usr/local/lib/php:/Applications/MAMP/path of zendframework/ "

or you can include library/zend while you create a project . I will show in later while we create a project.

3. Zend Framework also comes with a shell script that will help you with RAD (Rapid Application Deployment), you can create a shortcut to Zend Tools in terminal by adding an alias to your profile under /etc/profile and make sure to restart terminal after you’ve done so:

alias zf2=/Applications/MAMP/svn/zendframework/trunk/bin/zf.sh

4. Test if the Zend Tool is installed correctly by showing the version:

zf2 show version

5. Finally navigate to the directory you’d like to create your first project in:

zf2 create project quickstart

And then I create a virtual hosts for local.quickstart.com and when I browse that i have seen a blank page . Then I try to find the error . so I open the php error file by this command : tail –f php_error.log

In that file I have seen lots of error message where most of the error messages are that files are not found.

So I have checked the files. I open a file controllers/indexController.php file . There I find nothing has been written . Same things happened for error Controller . So I have looked at the:
https://github.com/micrub/zf2-bootstrap

. And there I found that how to extend the controller and also how to extend the class. So now again browse the local.quickstart.com and now I have seen it works for me .

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: