我使用console命令: php bin / console doctrine:database:create Symfony部署在VPS服务器,Ubuntu 14.04
并返回错误:
php bin/console doctrine:database:create
PHP Warning: Uncaught exception 'Symfony\Component\Debug\Exception\ContextErrorException' with message 'Warning: require_once(/var/www/www-root/data/www/likezakaz.ru/../../../apache/htdocs/delivery/app/AppKernel.php): failed to open stream: No such file or directory' in /var/www/www-root/data/www/likezakaz.ru/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:142
Stack trace:
#0 /var/www/www-root/data/www/likezakaz.ru/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php(142): Symfony\Component\Debug\DebugClassLoader->loadClass()
#1 [internal function]: Symfony\Component\Debug\DebugClassLoader->loadClass('AppKernel')
#2 /var/www/www-root/data/www/likezakaz.ru/bin/console(26): spl_autoload_call('AppKernel')
#3 {main}
thrown in /var/www/www-root/data/www/likezakaz.ru/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php on line 142
PHP Fatal error: Symfony\Component\Debug\DebugClassLoader::loadClass(): Failed opening required '/var/www/www-root/data/www/likezakaz.ru/../../../apache/htdocs/delivery/app/AppKernel.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/www-root/data/www/likezakaz.ru/vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php on line 142
注意,apache / htdocs / delivery它是我的localhost服务器中的路径
答案 0 :(得分:0)
composer install --no-dev --optimaze-autoloader