Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Component/s: Documentation
-
Labels:None
-
Environment:n/a
Description
The documentation on this page is where the error is:
http://www.doctrine-project.org/documentation/cookbook/1_0/en/code-igniter-and-doctrine
Two lines of code in the block for database.php is stated as follows:
// Require Doctrine.php
require_once(realpath(dirname(_FILE_) . '/../..') . DIRECTORY_SEPARATOR . 'database/doctrine/Doctrine.php');
It should be:
// Require Doctrine.php
require_once(BASEPATH . 'database/doctrine/Doctrine.php');
And the other line of code in database.php is stated as:
// Load the models for the autoloader
Doctrine::loadModels(realpath(dirname(_FILE_) . '/..') . DIRECTORY_SEPARATOR . 'models');
When it should be
// Load the models for the autoloader
Doctrine::loadModels(APPPATH . 'models');
Please edit this to use the CodeIgniter constants. I fixed them in my app because the info in your tutorial was wrong. This is because I ALWAYS separate my application directory and my system directory, and move them away from the web-accessible (htdocs) directory where my index.php resides.
Thanks!
Sean
What my database.php file looks like (after the config info).