Forum


Replies: 2   Views: 122
Install laravel and deploy with envoyer

Posted by plintsites  · 25-01-2019 - 15:49

We have a Laravel 5.7 website in which we try to make PHPdocx work. So far, the installation in the project worked using the docs here https://www.phpdocx.com/documentation/cookbook/integrate-phpdocx-with-laravel.

However, we deploy our code using Laravel Envoyer which copies the code from our git repo to a new directory on the server and runs composer install afterwards. The process can not complete though as an error occurs, probably because we had to put the phpdocx library in the /vendor folder manually.

Here is the error message from Envoyer:

Warning: require(/home/forge/dev.doc.legal/envoyer/releases/20190125134920/vendor/autoload.php): failed to open stream: No such file or directory in /home/forge/dev.doc.legal/envoyer/releases/20190125134920/artisan on line 18

Fatal error: require(): Failed opening required '/home/forge/dev.doc.legal/envoyer/releases/20190125134920/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/forge/dev.doc.legal/envoyer/releases/20190125134920/artisan on line 18
PHP Warning:  require(/home/forge/dev.doc.legal/envoyer/releases/20190125134920/vendor/autoload.php): failed to open stream: No such file or directory in /home/forge/dev.doc.legal/envoyer/releases/20190125134920/artisan on line 18
PHP Fatal error:  require(): Failed opening required '/home/forge/dev.doc.legal/envoyer/releases/20190125134920/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/forge/dev.doc.legal/envoyer/releases/20190125134920/artisan on line 18

Do you have any clue how we can solve this and make it deploy smoothly?

Thanks in advance!

Posted by admin  · 25-01-2019 - 16:08

Hello,

Maybe you need to clear the cache or generate the composer autoloader:

https://stackoverflow.com/questions/40804934/error-creating-migration-in-laravel-failed-to-open-stream

https://stackoverflow.com/questions/28468625/laravel-5-failed-opening-required-bootstrap-vendor-autoload-php?rq=1

Did you check if the required file ('/home/forge/dev.doc.legal/envoyer/releases/20190125134920/vendor/autoload.php') exists? that file isn't from phpdocx, it looks the Composer autoloader file is missing.

Regards.

Posted by olidev  · 26-03-2019 - 11:32

I have deploy Laravel to my hosting server through Envoyer before. The process is really easy. You have to connect your repo to Envoyer account and add your server as well. That's it. What process did you follow?