« Return to Thread: ZF quickstart not working?

Re: ZF quickstart not working?

by Breen Liblong :: Rate this Message:

Reply to Author | View in Thread

OK, here's some additional information.

I'm working through the Zend Framework tutorial and have got to the Create a Model and Database Table section (http://framework.zend.com/docs/quickstart/create-a-model-and-database-table), and am stuck at executing "php scripts/load.sqlite.php"

My configuration is
/home/breen/tmp/zfproject/quickstart/application/controllers
/home/breen/tmp/zfproject/quickstart/application/models
/home/breen/tmp/zfproject/quickstart/application/data
/home/breen/tmp/zfproject/quickstart/public/index.php
/home/breen/tmp/zfproject/quickstart/application/Bootstrap.php

The database is supposed to reside in data/db
Following another reference to database problems with the tutorial (http://www.nabble.com/QuickStart-and-creating-a-SQLite-database-td20154515.html) I've tried to create the database files in data/db via
    touch guestbook.db
    touch guestbook-dev.db
    touch guestbook-testing.db

and have even done a 'chmod -R 0777 application', all to no avail.  Running
    php scripts/load.sqlite.php
keeps giving me:
    Writing Database Guestbook in (control-c to cancel):
    AN ERROR HAS OCCURED:
    SQLSTATE[HY000] [14] unable to open database file

The file /home/breen/tmp/zfproject/quickstart/application/configs/application.ini defines the database path as
...
resources.db.params.dbname = APPLICATION_PATH "/../data/db/guestbook.db"
...

so the path looks correct to me.

Hope this gives you enough information to help you, help me (echoes of Jerry Maguire: "Help me ... help you. Help me, help you." :-)

Please let me know if you need any additional information.

Breen

tfk wrote:
On Thu, May 14, 2009 at 1:07 AM, Breen Liblong <breen.liblong@shaw.ca> wrote:
>
> I've managed to work through the problems with the latest quickstart tutorial
> to this point, but no matter how I set permissions for the files (and parent
> directories) I still get the "General error: 14 ..." message.
>
> Any other ideas on how to get past here?

Help us, so we can help you.

For starters, let's say your app layout is:

/root/app/controllers
/root/app/models
/root/app/data
/root/www/index.php
/root/boostrap.php

Where is your SQLite database supposed to be, and are you sure it
matches the path used in your PHP code?

As Matthew pointed out, chmod the directory. I usually wouldn't
recommend it, but a 'chmod 777 directory/' may actually help you to
move forward, etc..

Till

 « Return to Thread: ZF quickstart not working?