PHP Fatal error: Class 'sfContext' not found

691 views Asked by At

hi I'm using php/symfony ( symfony 1.0 ) and im getting following exception at the very first page

PHP Fatal error: Class 'sfContext' not found

I tried symfony cc at the root and its working but error is still there , may be its due to failure in autoloading files and following line from the code gives me the exception

    $customerName = sfContext::getInstance()->getUser()->getAttribute('meta.customerName');

I'm assuming it might be a symfony exception

2

There are 2 answers

0
Lakshitha Udara On

Sorry for the less information , actually I was installing a web based application and thats all printed in the log , anyhow I managed to find the fault with adding some var_dumps on the flow methods ,

missing php-mysqli extension caused the problem and unfortunately it's not handled from the application level so only a symfony level single line exception printed.

0
Rahul Goenka On

Here is the stack trace :

PHP Fatal error: Uncaught Error: Class 'sfContext' not found in /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php:171\nStack trace:\n#0 [internal function]: sfCore::splAutoload('sfContext')\n#1 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php(171): spl_autoload_call('sfContext')\n#2 [internal function]: sfCore::splAutoload('sfPhpConfigHand...')\n#3 /usr/local/rms/evt/uranai/cache/pc/prod/config/config_config_handlers.yml.php(7): spl_autoload_call('sfPhpConfigHand...')\n#4 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(279): require_once('/usr/local/rms/...')\n#5 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(60): sfConfigCache->loadConfigHandlers()\n#6 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/config/sfConfigCache.class.php(190): sfConfigCache->callHandler('config/settings...', Array, '/usr/local/rms/...')\n#7 /usr/local/rms/evt/uranai/lib/symfony-1.0.11/symfony.php(87): sfConfigCache->checkConfig('config/settings...')\n#8 /usr/local/rms/evt in /usr/local/rms/evt/uranai/lib/symfony-1.0.11/util/sfCore.class.php on line 171