<p>I resolved this issue by removing the vendor folder in the Laravel package.</p>

<p>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.</p>

<p>This removes the need to run the 'composer install' command post installation.</p>

CC BY-SA 4.0
2019-05-23T01:21:00.773Z
2019-05-23T01:21:00.773Z
Oliver Kucharzewski
<p>Every few hours, my Laravel website on AWS Elastic Beanstalk crashes and throws the following error:</p>

<pre><code>[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
</code></pre>

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

<p>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.</p>

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

CC BY-SA 4.0
2019-05-22T19:20:04.980Z
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
<amazon-web-services><amazon-ec2>
AWS Site crashes every few hours
Oliver Kucharzewski
# AWS Site crashes every few hours

(Asked by: username_0 on 2019-05-19)

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?

**Tags:** amazon-web-services, amazon-ec2

> **Comments:**
> **username_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.  

---

## 1 answers

### Answer by username_0 on 2019-05-23. Score: 1 | Accepted answer

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.


---

