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 2 years, 10 months ago.

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

    matt
    Participant

    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.

    #332

    Slavey Karadzhov
    Participant

    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.

    #333

    matt
    Participant

    Cool, I am subscribed. Thanks.

    #343

    Slavey Karadzhov
    Participant

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

    1. Clone the current repo:
    git clone https://github.com/slaff/learnzf2.git

    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 0.0.0.0:3456 -t public/

    5. Open your browser and type the URL:
    http://localhost:3456

    Hopefully you will see the home page of the application.

    6. Login as member
    http://localhost:3456/user/log/in

    with user/pass: member@learnzf2.com/member123

    If you want the admin user then use:
    user/pass: admin@learnzf2.com/admin123

    7. Then go to the list of exams:
    http://localhost:3456/exam/test/list

    (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.