ZF-7401: Errors in QuickStart

Issue Type: Docs: Problem Created: 2009-07-27T23:03:04.000+0000 Last Updated: 2010-07-22T05:38:53.000+0000 Status: Resolved Fix version(s): - 1.9.2 (25/Aug/09)

Reporter: Shein Alexey (conf) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments:


First, (on the page […]) the script scripts/load.sqlite.php won't work if ZendFramework is not in the php include path, it will throw fatal error on line

<pre class="highlight">
insert following code 

// Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), )));

<pre class="highlight">
before line 

Next, there is a typo in the command of executing script. Now:

<pre class="highlight">
Should be:

Now the data will be inserted too.

And the last one, script creates sqlite database file with the rights 600 on *nix, it should be changed to 666 to prevent errors in writing under different users (web server and command line). Fix: after line

<pre class="highlight">


Posted by Satoru Yoshida (satoruyoshida) on 2009-08-01T18:40:19.000+0000

If quickstart exists on SVN, I could some help for you by spellcheck, or code format..etc.

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-08-01T18:49:30.000+0000

Doesn't… fairly well tell you to add it to your include path?

Posted by Shein Alexey (conf) on 2009-08-03T00:26:24.000+0000

2Dolf Schimmel: First, thank you for your time. Ok, let's look on that page. {quote} Download the latest version of Zend Framework and extract the contents; make a note of where you have done so. Optionally, you can add the path to the library/ subdirectory of the archive to your php.ini's include_path setting. {quote} As you can see there is a word "Optionally". So, as I don't like to change my php.ini without extra need, I skipped this part. Next: {quote} At this point, if you haven't added Zend Framework to your include_path, we recommend either copying or symlinking it into your library/ directory. In either case, you'll want to either recursively copy or symlink the library/Zend/ directory of your Zend Framework installation into the library/ directory of your project. On unix-like systems, that would look like one of the following:

<pre class="highlight">
# Symlink:
% cd library; ln -s path/to/ZendFramework/library/Zend .

# Copy:
% cd library; cp -r path/to/ZendFramework/library/Zend .

{quote} So I made symlink and all worked out of the box, as expected, excepting the script load.sqlite.php that relies on the settings in the include_path although this is optional behavior.

Posted by Ryan Schmidt (ryandesign) on 2009-08-16T21:51:24.000+0000

This first item (about the include_path) is a duplicate of issue #7091.

Posted by Ryan Schmidt (ryandesign) on 2009-08-16T22:34:37.000+0000

To the second issue, I agree "php scripts/load.sqlite.php" needs to be "php scripts/load.sqlite.php --withdata" (note: not "--with-data"). This needs to be fixed in the "do the following:" code sample, but is already fixed in the "You should see output like the following:" section that follows.

Posted by Shein Alexey (conf) on 2009-08-16T23:18:23.000+0000

2Ryan Schmidt: Thanks, for the answer, I really missed that issue #7091. What about the last enhancement about chmoding rights?

Posted by Ryan Schmidt (ryandesign) on 2009-08-17T00:42:39.000+0000

I agree with you about the third and final issue as well. On my Mac OS X system, files are by default created with 644 permissions, not 600 as they were for you, but either way, these are insufficient permissions for the web server to be able to write to the database, if I am the user who created it. Attempting to sign the guestbook results in this message:

An error occurred Application error Exception information: Message: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database

chmodding the guestbook database to 666 as you suggest is one possible fix for this, and is consistent with the existing instructions in the quickstart to chmod the data and data/db directories to 777. I agree it would make sense for scripts/load.sqlite.php to do this chmod for you after it creates the database.

Posted by Shein Alexey (conf) on 2009-08-17T02:55:45.000+0000

Thank you very much :)

Posted by Matthew Weier O'Phinney (matthew) on 2009-08-25T05:05:11.000+0000

Fixed in ZF website sources; will release with 1.9.2 today

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.