1

I get the following error in app_dev.php on my production server:

ErrorException: Notice: Undefined variable: output in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Shell/Shell.php line 59

  1. in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Shell/Shell.php line 59
  2. at ErrorHandler->handle('8', 'Undefined variable: output', '/www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Shell/Shell.php', '59', array('command' => 'find')) in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Shell/Shell.php line 59
  3. at Shell->testCommand('find') in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php line 123
  4. at AbstractFindAdapter->isSupported() in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Adapter/GnuFindAdapter.php line 30
  5. at GnuFindAdapter->isSupported() in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Finder.php line 700
  6. at Finder->searchInDirectory('/www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations') in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/Finder/Finder.php line 628
  7. at Finder->getIterator() in /www/acme/www/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php line 555
  8. at FrameworkExtension->registerTranslatorConfiguration(array('fallback' => 'pl', 'enabled' => true), object(ContainerBuilder)) in /www/acme/www/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php line 106
  9. at FrameworkExtension->load(array(array('translator' => array('fallback' => 'pl'), 'secret' => 'eea6ad638afadb62cd7bc360e98f7d3b', 'router' => array('resource' => '/www/acme/www/app/config/routing.yml', 'strict_requirements' => true), 'form' => true, 'csrf_protection' => true, 'validation' => array('enable_annotations' => true), 'templating' => array('engines' => array('twig')), 'trust_proxy_headers' => false, 'default_locale' => 'pl', 'session' => null), array('router' => array('resource' => '/www/acme/www/app/config/routing_dev.yml'), 'profiler' => array('only_exceptions' => false))), object(ContainerBuilder)) in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php line 42
  10. at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php line 39
  11. at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php line 119
  12. at Compiler->compile(object(ContainerBuilder)) in /www/acme/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php line 494
  13. at ContainerBuilder->compile() in /www/acme/www/app/bootstrap.php.cache line 950
  14. at Kernel->buildContainer() in /www/acme/www/app/bootstrap.php.cache line 859
  15. at Kernel->initializeContainer() in /www/acme/www/app/bootstrap.php.cache line 571
  16. at Kernel->boot() in /www/acme/www/app/bootstrap.php.cache line 614
  17. at Kernel->handle(object(Request)) in /www/acme/www/web/app_dev.php line 29

Everything works fine on my localhost so it can be something wrong with the server configuration.

2
  • Are you running symfony 2.0 or 2.1? Which version of the process component? Which php version? Does the app/check.php and web/config.php point out any errors? Commented Dec 3, 2012 at 14:26
  • @Sgoettschkes I have just answered my own question. PHP exec() function is turned off. Commented Dec 3, 2012 at 14:30

2 Answers 2

1

Hosting provider has turned PHP exec function off because of the security reasons. That's why above error occurred. Does anyone know if its possible to bypass exec function in Symfony2 - I mean if it's possible to run symfony2 on the server with exec function turned off?

Sign up to request clarification or add additional context in comments.

Comments

1

I've got the same problem with my hosting, with php safe_mode off. Actually there is a todo, but I dont know when they will fix it.

// todo: find a better way (command could not be available)
exec('command -v '.$command, $output, $code);

as seen in Symfony\Component\Finder\Shell\Shell;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.