k314
k314

Reputation: 3

Doctrine 1 and Zend 1.12 do not want to work

I got problem with Doctrine. I add this lines in my application.ini:

includePaths.model = APPLICATION_PATH "/models"



autoloaderNamespaces[] = "Doctrine"

doctrine.dns = "mysql://root@localhost/translators"
dectrine.data_fixtures_path = APPLICATION_PATH "/doctrine/data/fixtures"
doctrine.models_path = APPLICATION_PATH "/models"
doctrine.migrations_path = APPLICATION_PATH "/doctrine/migrations"
doctrine.sql_path = APPLICATION_PATH "/doctrine/data/sql"
doctrine.yaml_schema_path = "APPLICATION_PATH "/doctrine/schema"

doctrine.generate_models_options.pearStyle = true
doctrine.generate_models_options.generateTableClasses = true
doctrine.generate_models_options.generateBaseClasses = true
doctrine.generate_models_options.baseClassPrefix = "Base_"
doctrine.generate_models_options.baseClassesDirectory =
doctrine.generate_models_options.classPrefixFiles = false
doctrine.generate_models_options.classPrefix = "Application_Model_"

and this in Bootstrap.php

public function _initDoctrine()
{
    $doctrineConfig = $this->getOption('doctrine');
    $manager = Doctrine_Manager::getInstance();
    $manager->setAttribute(Doctrine_Core::ATTR_AUTO_ACCESOR_OVERRIDE, true);
    $conn = Doctrine_Manager::connection($doctrineConfig['dns'], 'doctrine');
    $conn->setAttribute(Doctrine_Core::ATTR_USE_NATIVE_ENUM, true);
    return $conn;
}

after that, my side do not want to work. It give me that error:

( ! ) Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'syntax    error, unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in C:\projects\translators\library\Zend\Config\Ini.php on line 182
( ! ) Zend_Config_Exception: syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in C:\projects\translators\application/configs/application.ini on line 41 in C:\projects\translators\library\Zend\Config\Ini.php on line 182
Call Stack
#   Time    Memory  Function    Location
1   0.0008  329544  {main}( )   ..\index.php:0
2   0.0033  336296  Zend_Application->__construct( )    ..\index.php:24
3   0.0066  350080  Zend_Application->_loadConfig( )    ..\Application.php:85
4   0.0108  376896  Zend_Config_Ini->__construct( ) ..\Application.php:386
5   0.0109  376928  Zend_Config_Ini->_loadIniFile( )    ..\Ini.php:126
6   0.0109  376928  Zend_Config_Ini->_parseIniFile( )   ..\Ini.php:202

Before I added these lines, the side worked.

Where's the problem? database: login: root@localhost and i got no password. Please help

Upvotes: 0

Views: 524

Answers (1)

Iznogood
Iznogood

Reputation: 12843

This line:

doctrine.yaml_schema_path = "APPLICATION_PATH "/doctrine/schema"

Has a not needed and extra " at the beginning before APPLICATION_PATH

doctrine.yaml_schema_path = APPLICATION_PATH "/doctrine/schema"

Thats all.

Upvotes: 1

Related Questions