Pragmatism in the real world

Zend Framework Tutorial for 0.7

Just a quick update to let you know that version 1.2.x of my Zend Framework Tutorial does actually work on version 0.7 of the framework with no changes. This is because the public API for the MVC components in 0.7 are backwards compatible with 0.6.

I expect that from now on, the basic API for the MVC will stay the same. More advanced stuff, like the module support might change though.

10 thoughts on “Zend Framework Tutorial for 0.7

  1. I am having a problem with the tutorial. I have downloaded the code and followed the instructions 4 seperate times. I keep getting the same error (Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Album.php" was not found.') when I get to the connecting to the database section. I have tried this tutorial on two different webservers supporting the latest PHP and MySQL versions. I am using zend framework 0.7. Any help would be appreciated.

  2. Hi Jeff,

    At a guess, I'd say that your models directory isn't on the php_include path, or you haven't used Zend::loadClass('Album'); in your controller's init() member function.



  3. Rob,

    Thanks. Your first guess was correct. I needed to include the models directory on the php_include path.


  4. Hello,
    I have problem with controllers.
    IndexController.php work fine, all functions which included in it works.
    But I need split own project between a few controllers and I have created FooController.php and when I try to get it via http://localhost/foo , I got the 404 Error page.
    In the apache log file I see that file foo not found.
    What I need to check? May be some tips you have?

    Best regards,

  5. Hi Ian,

    I'd suspect an Apache configuration issue related to mod_rewrite. Possibly "allowoveride" not set to "all" so the .htaccess isn't being used?



  6. Interesting series of blog entries. Your posts have cleared up some ZF ambiguities introduced by the ZF manual.

    I've had some problems dealing with trailing /'s on my urls, and I'm wondering if you've had the same issues, and if so what your resolution was?

    http://myhost/foo/MyController works. MyController is fired w/indexAction()

    http://myhost/foo/MyController/ fails. I noticed in my Apache logs that browser is, I think, requesting index.html. ZF bombs out saying "I found MyController", but I didn't find "indexHtmlAction"

    Very intriguing.

    I've used various incarnations of Apache's RewriteBase , rewriteRules & rewriteCond , but nothing seems willing to cooperate.

    One item of note, in my situation, is that I'm not using DocumentRoot as my app's base. I've got aliases off of documenrRoot for various developmental milestones, eg;

    /experimental /mywebdir/experimental
    /testing /mywebdir/testing

    et al.

  7. Hi, the only thing i've changed from 0.7 to 0.8 version of ZF is the following line in the bootstrap file 'index.php' :


    // setup controller
    $route = new Zend_Controller_Router_Rewrite();

Comments are closed.