Note that there are some explanatory texts on larger screens.

plurals
  1. POFatal exception in loading ini file
    primarykey
    data
    text
    <p>My project folder is demo, inside which I have the folders application, library and public. Inside the application folder, I have a folder named configs, inside which I have a file 'application.ini', which contains my database parameters. So, in the bootstrap.php which is in application directory, I set my database in Zend registry in a function called <code>_initDbAdapter</code>:</p> <pre><code>$config = new Zend_Config_Ini('/demo/application/configs/application.ini', 'development'); Zend_Registry::set('config', $config); $db = Zend_Db::factory($config, $config-&gt;resources-&gt;db-&gt;params-&gt;asArray()); Zend_register('db', $db); </code></pre> <p>When I point my browser to localhost/demo/public/ (since my index.php resides in the public folder), I get the following error:</p> <pre><code>Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'parse_ini_file(/demo/application/configs/application.ini): failed to open stream: No such file or directory' in /var/www/demo/library/Zend/Config/Ini.php:182 Stack trace: #0 /var/www/demo/library/Zend/Config/Ini.php(202): Zend_Config_Ini-&gt;_parseIniFile('/demo/applicati...') #1 /var/www/demo/library/Zend/Config/Ini.php(126): Zend_Config_Ini-&gt;_loadIniFile('/demo/applicati...') #2 /var/www/demo/application/Bootstrap.php(32): Zend_Config_Ini-&gt;__construct('/demo/applicati...', 'development') #3 /var/www/demo/library/Zend/Application/Bootstrap/BootstrapAbstract.php(669): Bootstrap-&gt;_initDbAdapter() #4 /var/www/demo/library/Zend/Application/Bootstrap/BootstrapAbstract.php(622): Zend_Application_Bootstrap_BootstrapAbstract-&gt;_executeResource('dbadapter') #5 /var/www/demo/library/Zend/Application/Bootstrap/BootstrapAbstract.php(586): Zend_Application_Bootstrap_BootstrapAbstract-&gt;_bootstrap(NULL) #6 /var/www/demo/library/Zend/Application.php(355): Zend_Application in /var/www/demo/library/Zend/Config/Ini.php on line 182 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload