phalcon - Missing 'className' parameter -
i working on old project change request , project developed in phalcon 1.2.6 verson. when trying execute application application returns error. after doing r&d found system did not find config key $di
object.
when trying print $di
object it's printing key config. when trying access config key, unable access it.
when system tries execute below code, throws exception.
$di = \phalcon\di::getdefault(); print_r($di['config']);
i getting below error.
invalid service definition. missing 'classname' parameter #0 [internal function]: phalcon\di\service\builder->build(object(phalcon\di\factorydefault), array, null) #1 [internal function]: phalcon\di\service->resolve(null, object(phalcon\di\factorydefault)) #2 [internal function]: phalcon\di->get('config', null) #3 /var/www/sites/mfs_merged/apps/api/module.php(44): phalcon\di->offsetget('config') #4 [internal function]: appserver\api\module->registerservices(object(phalcon\di\factorydefault)) #5 /var/www/sites/mfs_merged/public/index.php(64): phalcon\mvc\application->handle() #6 {main}
below part of $di
object
phalcon\di\factorydefault object ( [_services:protected] => array ( [...] => phalcon\di\service object (....) [config] => phalcon\di\service object ( [_name:protected] => config [_definition:protected] => array ( [database] => array ( [adapter] => oracle [host] => 172.20.3.228 [username] => xxxxx [password] => xxxxxxx [schema] => xe [dbname] => (description = (address = (protocol = tcp)(host = 172.20.3.228)(port = 1521)) (connect_data = (server = dedicated) (service_name = xe))) ) [memcache] => array ( [lifetime] => 3600 [host] => localhost [port] => 11211 [persistent] => ) [soapclient] => array ( [connectiontimeout] => 60 [exceptions] => [trace] => 1 [cache] => 0 [usesoapheader] => 1 [soapheader] => array ( [username] => xxxxx [password] => xxxxxx ) ) [smscodeslogpath] => /var/www/sites/mfs_merged/config/tz/../../public/files/_smstokens/tokens_tz.log ) [_shared:protected] => 1 [_sharedinstance:protected] => ) ) [_sharedinstances:protected] => array (.....) [_freshinstance:protected] => 1 )
Comments
Post a Comment