Forum


Replies: 2   Views: 3816
Install laravel and deploy with envoyer
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

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

Also, note that you can use a private repository (for example using GitHub or BitBucket) to install phpdocx using Composer (https://www.phpdocx.com/documentation/cookbook/integrate-phpdocx-with-composer).

Regards.

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

I have deployed 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?