My Laravel 3.2.14 application works locally. When I upload it to my server I get this:
-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Tue May 06 07:35:55.995408 2014] [:error] [pid 25701] [client 174.31.190.151:57098] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 07:35:56.184608 2014] [:error] [pid 25703] [client 174.31.190.151:57099] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 07:40:11.514372 2014] [:error] [pid 25705] [client 174.31.190.151:57103] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 07:40:11.704632 2014] [:error] [pid 25706] [client 174.31.190.151:57104] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 10:18:36.676282 2014] [:error] [pid 25707] [client 185.4.227.194:40880] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 10:54:08.718764 2014] [:error] [pid 25701] [client 115.239.248.56:4697] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 13:39:02.024516 2014] [:error] [pid 25703] [client 173.244.215.194:56452] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
[Tue May 06 13:47:31.401996 2014] [:error] [pid 25705] [client 122.226.223.83:4460] PHP Fatal error: Class 'Symfony\\Component\\HttpFoundation\\LaravelRequest' not found in /var/app/current/laravel/core.php on line 157
Is this a problem with my composer autoload file? I get no other inclination of what's happening. I've been working on this for two days and not sure where to go from here :/
I know the comments below your question have told you take vendor/
out of your .gitignore
, but that isn't normal practice. Elastic Beanstalk for PHP actually supports Composer and will automatically run composer install
on your project when you are pushing a new version.
For this to work, the root of your repo should be the root of the app. You should also have composer.json
and composer.lock
files enabled by your .gitignore
so that when they are pushed, EB knows to download and install your packages.
Your vendor/
files are not included when you push to AWS Beanstalk because they're ignored by your .gitignore
file.
You need to include in your git project your composer.json
and composer.lock
to send them on AWS Beanstalk on each update.
You can run composer to install the dependencies with a configuration like explained here : https://stackoverflow.com/a/17528576/1671377
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.