Details
-
Type:
Docs: Problem
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.9.2
-
Component/s: Zend_Application
-
Labels:None
-
Language:English
-
Tags:
Description
First, (on the page http://framework.zend.com/docs/quickstart/create-a-model-and-database-table) 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
require_once 'Zend/Application.php';
Solution:
insert following code
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
before line
require_once 'Zend/Application.php';
Next, there is a typo in the command of executing script.
Now:
% php scripts/load.sqlite.php
Should be:
% php scripts/load.sqlite.php --with-data
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
$dbAdapter->getConnection()->exec($schemaSql);
add
chmod($dbFile, 0666);
If quickstart exists on SVN, I could some help for you by spellcheck, or code format..etc.