vmittal (4) [Avatar] Offline
#1
HI

I am getting the following error and have no clue.
Error Messge
Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'Section ' general' cannot be found in /home/demo/application/config.ini' in /home/demo/lib/Zend/Config/Ini.php:156 Stack trace: #0 /home/demo/public_html/index.php(22): Zend_Config_Ini->__construct('/home/demo/applic...', ' general') #1 {main} thrown in /home/demo/lib/Zend/Config/Ini.php on line 156

I did the following two things
1. added a config.ini file under applicaion directory
2. added the following code to index.php under www/ directory

// Register the autoloader
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Registry');
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Db');
Zend_Loader::loadClass('Zend_Db_Table');// load configuration

$config = new Zend_Config_Ini(ROOT_DIR.'/application/config.ini', ' general');

Zend_Registry::set('config', $config);

// setup database

$dbAdapter = Zend_Db::factory($config->db->adapter,

$config->db->config->toArray());

Zend_Db_Table::setDefaultAdapter($dbAdapter);
Zend_Registry::set('dbAdapter', $dbAdapter);
vmittal (4) [Avatar] Offline
#2
Fixed Fatal error: Uncaught exception 'Zend_Config_Exception' with message
I got this error fixed.

Please disregard
akrabat (479) [Avatar] Offline
#3
Re: Fixed Fatal error: Uncaught exception 'Zend_Config_Exception' with mess
Hi vmittal,

I'm glad you sorted it!

Regards,

Rob...
puneetsiet (1) [Avatar] Offline
#4
Re: Fatal error: Uncaught exception 'Zend_Config_Exception' with message
hi dear,
i m facing the same the problem , can u suggest me the solution.
Also, i m not getting this file "RewriteRouter.php", so if poosiable than plz send it to me also

Plz reply asap.
Thanks
Puneet
mzalazar (1) [Avatar] Offline
#5
Re: Fatal error: Uncaught exception 'Zend_Config_Exception' with message
Excuse my english... if someone is having this problem, it's because the space just before
the word general, the fix is just delete the space char. I hope this will be usefull to someone!
Mzalazar.
351289 (1) [Avatar] Offline
#6
Hi Dear,

I am facing the same problem, Please can u suggest me the solution. so if poosiable than plz send it to me also

Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'Section '223_130_25_175' cannot be found in /home/playloca/public_html/application/configs/application.ini' in /home/playloca/public_html/library/Zend/Config/Ini.php:150 Stack trace: #0 /home/playloca/public_html/library/Zend/Application.php(383): Zend_Config_Ini->__construct('/home/playloca/...', '223_130_25_175') #1 /home/playloca/public_html/library/Zend/Application.php(85): Zend_Application->_loadConfig('/home/playloca/...') #2 /home/playloca/public_html/public/index.php(43): Zend_Application->__construct('223_130_25_175', '/home/playloca/...') #3 {main} thrown in /home/playloca/public_html/library/Zend/Config/Ini.php on line 150

Please reply asap.
Thanks,
Sharma.