Setting up an MVC structure with the Zend Framework – part 1
Hi,
I just released a new video on setting up an MVC structure with the Zend Framework. This video is a little more basic than the previous Zend videos … I had to twist Jon’s arm a little.
Anyway, let us know what you think and should you have any suggestions or request, please feel free to comment.
Running time: 12+ minutes
Part 1 of 2.
Thanks,
Stefan Mischook
www.killerphp.com
www.killersites.com
Pingback: Setting up an MVC structure with the Zend Framework - part 1 | Development Feeds
trackback: “Un vídeo bastante ilustrativo para empezar a trabajar en MVC con ZF; está en ingles pero es bastante fácil de entender.”
http://cuatroxl.wordpress.com/2008/03/25/empezando-en-la-estructura-mvc-con-zend_framework-i-video-tutorial/
Pingback: Stefan Mischook’s Blog: Setting up an MVC structure with the Zend Framework - part 1 | Development Blog With Code Updates : Developercast.com
Pingback: Setting up an MVC structure with the Zend Framework - part 1 | PHP Podcasts
I found your tutorial on ZF very helpful for my 1st forray into this new framework.
The one part I struggled with is where you set up your Virtual hosts with MAMP. You had a custom httpd.conf file but I tried to replicate your your syntax with the help of the apache manual on setting up virtual hosts with no luck.
Is there any possibility of you doing a screen cast or tutorial on how you set up your MAMP virtual hosts please. I did a google search and there is a lot of people having similar problems and the MAMP forum isn’t very helpful 🙁
keep up the good work, thanks.
@Andy:
Thanks for the feedback. Doing a MAMP video sounds like a great idea. I’ll put something together in the coming weeks.
@Andy I struggled with this to. I use linux so what I eventually ended up doing was making a new folder called virtualhost in my httpd directory or in the parent directory of where your httpd.conf file is i.e.
->httpd “folder”
->->conf “folder”
->->->httpd.conf “file”
->->virtualhost “folder”
->->->v.hosts.conf “file”
And after backing up my httpd.conf file to httpd.conf.backup I went down to section 3 of my httpd.conf file and cut the whole section out and put it in my v.host.conf file and then where section 3 was I ended up putting include virtualhosts/*.conf
Now depending on your directory root of your virtualhost, if it is above your default directory root you might have to add
Options FollowSymLinks
AllowOveride ALL
The “*” means any folder I drop in sites that has a public_html folder will read .htacces files with the AllowOveride set to All. The Options can be overridden by the virtual host configuration file.
In my host file I added the 127.0.0.1 “whatever”
and in the v.host.conf file I have this setup
NameVirtualHost 127.0.0.1
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#
DocumentRoot “/var/www/html”
ServerName localhost
ServerAdmin admin@zendtest
DocumentRoot “/var/www/sites/zendtest/public_html”
ServerName zendtest
ErrorLog /var/www/sites/zendtest/logs/error_log
CustomLog /var/www/sites/zendtest/logs/access.log common
DocumentRoot “/var/www/sites/zendtest/tests”
ServerName zendtest.test
stripped my <‘s and >’s
so it would be
<Directory “var/www/sites/*/” >
Options FollowSymLinks
AllowOveride ALL
<Directory >
and the v.hosts are
<VirtualHost 127.0.0.1 >
DocumentRoot “/var/www/html”
ServerName localhost
<VirtualHost >
<VirtualHost 127.0.0.1 >
ServerAdmin admin@zendtest
DocumentRoot “/var/www/sites/zendtest/public_html”
ServerName zendtest
ErrorLog /var/www/sites/zendtest/logs/error_log
CustomLog /var/www/sites/zendtest/logs/access.log common
<VirtualHost >
<VirtualHost 127.0.0.1 >
DocumentRoot “/var/www/sites/zendtest/tests”
ServerName zendtest.test
<VirtualHost >
Options FollowSymLinks
AllowOveride ALL
my bad
<Directory “var/www/sites/*/public_html” >
Options FollowSymLinks
AllowOveride ALL
<Directory >
sorry again stefan