0

Every few hours, my Laravel website on AWS Elastic Beanstalk crashes and throws the following error:

[Sun May 19 13:06:13.436195 2019] [php7:error] [pid 3431] [client]
   PHP Fatal error:  require(): Failed opening required 
   '/var/app/current/vendor/composer/../symfony/polyfill-php70/bootstrap.php'
   (include_path='.:/usr/share/pear7:/usr/share/php') in 
   /var/app/current/vendor/composer/autoload_real.php on line 66



[Sun May 19 13:06:31.485081 2019] [php7:warn] [pid 3459] [client] PHP
   Warning: 
   require(/var/app/current/vendor/composer/../symfony/polyfill-php70/bootstrap.php):
   failed to open stream: No such file or directory in
   /var/app/current/vendor/composer/autoload_real.php on line 66

In-order to fix the error, I either go to /var/www/html or /var/app/current and use composer.phar install to fix the packages installed.

Unfortunately, this doesn't cut it. Once I fix the issue, it breaks again a few hours later with the same errors. I tried to fix the packages associated with the deployed zip file. But that's to no avail either.

Is there something I'm misunderstanding about the AWS architecture? I'm new to AWS, any help?

1
  • This should not be an specific issue with AWS. There must be something inside the server which is causing this or some kind of hack to your website. You may need to check logs in more detail. – Samit May 22 '19 at 19:20
1

I resolved this issue by removing the vendor folder in the Laravel package.

Once the vendor folder is removed, the composer.json file is automatically used to run the installation. All necessary files are then downloaded and installed.

This removes the need to run the 'composer install' command post installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.