working example of code in book?

Home Forums Learn ZF2 working example of code in book?

This topic contains 3 replies, has 2 voices, and was last updated by  Slavey Karadzhov 4 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #328


    It would be helpful to have a working example to try out so as to see clearly how the code is intended to work.

    For example, on my dev box, I just logged in using the learnzf2 code, but there is no persistence of the session and I’m just re-presented with the login page again.

    It seems odd that it would be that way, but perhaps it was left up to the dev to figure out. In any case, a working example would clarify.


    Slavey Karadzhov

    I agree with you and what I will do in the near future is to change the repo a bit so that the last commit gives you a working application.

    The task will be to make one git command and end up with a working solution without extra commands or reading big manuals.

    I have to investigate if SQLite, ZF2 and Doctrine 2 play well together. Matt, you can subscribe to this topic and follow the progress.



    Cool, I am subscribed. Thanks.


    Slavey Karadzhov

    Hi Matt,
    Can you check if the following is working for you:

    1. Clone the current repo:
    git clone

    2. Update composer.phar to the latest version
    cd learnzf2
    php composer.phar self-update

    3. Install composer dependencies
    php composer.phar install –no-dev

    4. Start the built in PHP web server. You will need php v5.4 or newer:
    php -S -t public/

    5. Open your browser and type the URL:

    Hopefully you will see the home page of the application.

    6. Login as member

    with user/pass:

    If you want the admin user then use:

    7. Then go to the list of exams:

    (Notice: if you see the DB rewind error, then try to reload the page)

    8. And just for fun take some of them.

    So if these steps worked for you then I reflect these changes in the book too.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.