Search code examples
phpormpropel

Class StandardServiceContainer not found in Propel.php


When I call the getServiceContainer method of Propel class, i get this error :

PHP Fatal error: Class 'Propel\Runtime\StandardServiceContainer' not found in /var/www/webservices/vendor/propel/propel/src/Propel/Runtime/Propel.php on line 118


Solution

  • I solved the issue, it is because when i include or require the config.php which it is called getServiceContainer method, I had to require or include autoload.php for propel.Changing the require or include order of the php files solved my problem.