I'm trying to run Laravel in AWS Multicontainer Docker Environments.
I have followed the tutorial on http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecstutorial.html to deploy a simple PHP application with nginx, and it worked. So I have removed all the files in the default php-app folder and installed Laravel and ran composer install locally, and deployed using eb deploy command. However, I received the following error message:
Warning: require(/var/www/html/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
/var/www/html/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required
'/var/www/html/bootstrap/../vendor/autoload.php'
(include_path='.:/usr/local/lib/php') in
/var/www/html/bootstrap/autoload.php on line 17
Related
I have a:
Ubuntu 20.0.4
Docker 20.10.18, build b40c2f6
I got Laravel using the following command: curl -s https://laravel.build/example-app | bash
Then I run cd example-app/ && ./vendor/bin/sail up to run the example-app I got the following error opening http://localhost/ in a browser:
The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Invalid argument The exception occurred while attempting to log: The stream or file
How can I fix the error above? What is wrong with my local dev environment setup?
Running command vendor/bin/sail up generates the error I don't know how to fix.
I have a problem with deploying laravel into my Nginx. I deployed my laravel app thru github.com
but when I execute php artisan config:cache or php artisan make:auth
This is the error I get:
PHP Warning:
require(/var/www/gafsolutions.com/html/laravel/vendor/autoload.php):
failed to open stream: No such file or directory in
/var/www/gafsolutions.com/html/laravel/artisan on line 18 PHP Fatal
error: require(): Failed opening required
'/var/www/gafsolutions.com/html/laravel/vendor/autoload.php'
(include_path='.:/usr/share/php') in
/var/www/gafsolutions.com/html/laravel/artisan on line 18
First, make sure you have set up a composer properly composer install It will just install all the dependencies as specified in the composer.lock file
If you have already installed then run this command:composer dump-autoload It will clean up all compiled files and their paths.
After, run this command: composer update --no-scripts It will Skips execution of scripts defined in composer.json file.
Then run this command: composer update It will update your depencencies as they are specified in composer.json
I had run the same deploy hooks on AWS’s elastic beanstalk since I started deploying laravel to elastic beanstalk and on a recent update it failed to deploy due to something happening with the most recent composer.
The common approach to deploy with composer on elastic beanstalk is to update composer then use it to install your packages, which worked fine until I got the following error
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Warning: require(/var/app/ondeck/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/app/ondeck/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required ‘/var/app/ondeck/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/app/ondeck/bootstrap/autoload.php on line 17
As you can see, laravel couldn’t find the autoload file from the vendor folder which was a result of composer not running correctly
What would be the error and how to fix it.
I had the same issue this comes when you have made lot of changes in the development to the composer file and the environment which you set to deploy has no updates on the composer. First update you deployment machine by updating composer before deploying. This will solve your issue.
I have been maintaining my Laravel Project in Ubuntu and BitBucket previously. The application runs fine on Ubuntu. However, recently I tried to pull my application from BitBucket into Windows7 and I get the following errors:
Warning: require(C:\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\laravel\bootstrap\autoload.php on line 17
Fatal error: require() [function.require]: Failed opening required 'C:\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\laravel\bootstrap\autoload.php on line 17
I have Composer Installed on Windows7 and I tried composer command in command line which works fine.
Anyone can help?
Updated
Tried composer update and I get the version errors (), looks like I don't have compatible version of PHP. I have v5.3.8
Fatal error: require(): Failed opening required '/home/portalt/laravel/bootstrap/laravel/vendor/laravel/framework/src' (include_path='/home/portalt/laravel/vendor/phpseclib/phpseclib/phpseclib:.:/usr/lib/php:/usr/local/lib/php') in /home/portalt/laravel/bootstrap/start.php on line 59
I got this error after hosting laravel 4 as sub-domain in the shared hosting. How to solve this?
This looks like an error with your vendors, have you run composer install?
Laravel on shared hosts can be problematic if you don't have ssh access, if you have ssh access make sure composer is installed:
composer --version
if it is then in your root directory run:
composer install
if it is not installed, download it from:
https://getcomposer.org/download/ and run install.
If you don't have ssh access have you been developing your application locally? you should be able to upload all your vendors via FTP.
How did you deploy your app and are the vendors in place?