Advice for installing individual composer packages on shared hosting












0















We have a web application running on a shared hosting account that was built using Laravel. We now need to implement a payment gateway that requires vendor packages for the SDKs. However as mentioned composer is not supporting at all with the current hosting company.



Steps we took to get Laravel up and running on shared host:




  • We developed the application locally first on a development machine

  • Added version control and pushed the files to GitHub

  • We used SSH to gain access and then did a git pull to the server


We unfortunately had to package the vendor folder separately and push that over to the server (as this is not highly recommended without composer) it was our only option at the time.



By some miracle we got the application to run without any issues.



The problem we face now, is that we need to install SDK packages through composer for the payment gateway we need to implement.



We did the initial setup and build of the new module on the development machine first, but the problem we now face is, simply pushing the SDK into the vendor folder does not work, it still moans about the class files not being found. and there is no way for me to do a composer dump-autoload -o



We even went as far as re-packaging the updated version of the vendor folder, deleting the current one on the application and then doing another pull down from GitHub, but that throws all sorts of bootstrap/app.php issues with classes not being found.



We did try force allow_url_fopen=1 with a manually downloaded version of composer, but the shared hosting PHP CLI is 5.6 and PHP 7.0 is required.



We are unfortunately stuck and any advice would be highly appreciated.










share|improve this question

























  • Can you tell us the error details, which class is not found please?

    – Hieu Le
    Nov 16 '18 at 16:39
















0















We have a web application running on a shared hosting account that was built using Laravel. We now need to implement a payment gateway that requires vendor packages for the SDKs. However as mentioned composer is not supporting at all with the current hosting company.



Steps we took to get Laravel up and running on shared host:




  • We developed the application locally first on a development machine

  • Added version control and pushed the files to GitHub

  • We used SSH to gain access and then did a git pull to the server


We unfortunately had to package the vendor folder separately and push that over to the server (as this is not highly recommended without composer) it was our only option at the time.



By some miracle we got the application to run without any issues.



The problem we face now, is that we need to install SDK packages through composer for the payment gateway we need to implement.



We did the initial setup and build of the new module on the development machine first, but the problem we now face is, simply pushing the SDK into the vendor folder does not work, it still moans about the class files not being found. and there is no way for me to do a composer dump-autoload -o



We even went as far as re-packaging the updated version of the vendor folder, deleting the current one on the application and then doing another pull down from GitHub, but that throws all sorts of bootstrap/app.php issues with classes not being found.



We did try force allow_url_fopen=1 with a manually downloaded version of composer, but the shared hosting PHP CLI is 5.6 and PHP 7.0 is required.



We are unfortunately stuck and any advice would be highly appreciated.










share|improve this question

























  • Can you tell us the error details, which class is not found please?

    – Hieu Le
    Nov 16 '18 at 16:39














0












0








0








We have a web application running on a shared hosting account that was built using Laravel. We now need to implement a payment gateway that requires vendor packages for the SDKs. However as mentioned composer is not supporting at all with the current hosting company.



Steps we took to get Laravel up and running on shared host:




  • We developed the application locally first on a development machine

  • Added version control and pushed the files to GitHub

  • We used SSH to gain access and then did a git pull to the server


We unfortunately had to package the vendor folder separately and push that over to the server (as this is not highly recommended without composer) it was our only option at the time.



By some miracle we got the application to run without any issues.



The problem we face now, is that we need to install SDK packages through composer for the payment gateway we need to implement.



We did the initial setup and build of the new module on the development machine first, but the problem we now face is, simply pushing the SDK into the vendor folder does not work, it still moans about the class files not being found. and there is no way for me to do a composer dump-autoload -o



We even went as far as re-packaging the updated version of the vendor folder, deleting the current one on the application and then doing another pull down from GitHub, but that throws all sorts of bootstrap/app.php issues with classes not being found.



We did try force allow_url_fopen=1 with a manually downloaded version of composer, but the shared hosting PHP CLI is 5.6 and PHP 7.0 is required.



We are unfortunately stuck and any advice would be highly appreciated.










share|improve this question
















We have a web application running on a shared hosting account that was built using Laravel. We now need to implement a payment gateway that requires vendor packages for the SDKs. However as mentioned composer is not supporting at all with the current hosting company.



Steps we took to get Laravel up and running on shared host:




  • We developed the application locally first on a development machine

  • Added version control and pushed the files to GitHub

  • We used SSH to gain access and then did a git pull to the server


We unfortunately had to package the vendor folder separately and push that over to the server (as this is not highly recommended without composer) it was our only option at the time.



By some miracle we got the application to run without any issues.



The problem we face now, is that we need to install SDK packages through composer for the payment gateway we need to implement.



We did the initial setup and build of the new module on the development machine first, but the problem we now face is, simply pushing the SDK into the vendor folder does not work, it still moans about the class files not being found. and there is no way for me to do a composer dump-autoload -o



We even went as far as re-packaging the updated version of the vendor folder, deleting the current one on the application and then doing another pull down from GitHub, but that throws all sorts of bootstrap/app.php issues with classes not being found.



We did try force allow_url_fopen=1 with a manually downloaded version of composer, but the shared hosting PHP CLI is 5.6 and PHP 7.0 is required.



We are unfortunately stuck and any advice would be highly appreciated.







php laravel composer-php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 10:45









EricLavault

2,3531325




2,3531325










asked Nov 16 '18 at 8:30









Wes MurrayWes Murray

11




11













  • Can you tell us the error details, which class is not found please?

    – Hieu Le
    Nov 16 '18 at 16:39



















  • Can you tell us the error details, which class is not found please?

    – Hieu Le
    Nov 16 '18 at 16:39

















Can you tell us the error details, which class is not found please?

– Hieu Le
Nov 16 '18 at 16:39





Can you tell us the error details, which class is not found please?

– Hieu Le
Nov 16 '18 at 16:39












2 Answers
2






active

oldest

votes


















0














Try copying over composer.json and composer.lock and run the php artisan commands found in the composer.json






share|improve this answer
























  • Thanks for the reply, I gave this a try now and unfortunately no luck.

    – Wes Murray
    Nov 16 '18 at 8:48











  • I would suggest then that you copy all the files from your local env except .env to the server.

    – Josh
    Nov 16 '18 at 8:50













  • In other words, replace all the files on shared hosting again with the local app files?

    – Wes Murray
    Nov 16 '18 at 8:52











  • Yeah except the .env file

    – Josh
    Nov 16 '18 at 8:53











  • What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

    – common sense
    Nov 16 '18 at 8:54



















0














Some background:



PHP5.6 is outdated and not supported anymore by PHP. Therefore a lot of hosters remove this version from theirs servers (at least in Germany). Some already started and others will do beginning of 2019. For my experience hosters have already newer versions available on their servers, which need to be activated manually in the configuration panel by domain.



For the CLI PHP you can check this by ssh to your server and type php followed by hitting TAB two times. This gave me this:



php php53 php54 php55 php56 php70 php71 php72



Composer uses the default /usr/bin/php, which might be symlinked to php56 on your webspace. However, you can call Composer also with any other PHP version by:



php71 composer.phar



If your hoster does not support any newer PHP version I would demand it from him for security reasons or migrate to another one ASAP.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334053%2fadvice-for-installing-individual-composer-packages-on-shared-hosting%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try copying over composer.json and composer.lock and run the php artisan commands found in the composer.json






    share|improve this answer
























    • Thanks for the reply, I gave this a try now and unfortunately no luck.

      – Wes Murray
      Nov 16 '18 at 8:48











    • I would suggest then that you copy all the files from your local env except .env to the server.

      – Josh
      Nov 16 '18 at 8:50













    • In other words, replace all the files on shared hosting again with the local app files?

      – Wes Murray
      Nov 16 '18 at 8:52











    • Yeah except the .env file

      – Josh
      Nov 16 '18 at 8:53











    • What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

      – common sense
      Nov 16 '18 at 8:54
















    0














    Try copying over composer.json and composer.lock and run the php artisan commands found in the composer.json






    share|improve this answer
























    • Thanks for the reply, I gave this a try now and unfortunately no luck.

      – Wes Murray
      Nov 16 '18 at 8:48











    • I would suggest then that you copy all the files from your local env except .env to the server.

      – Josh
      Nov 16 '18 at 8:50













    • In other words, replace all the files on shared hosting again with the local app files?

      – Wes Murray
      Nov 16 '18 at 8:52











    • Yeah except the .env file

      – Josh
      Nov 16 '18 at 8:53











    • What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

      – common sense
      Nov 16 '18 at 8:54














    0












    0








    0







    Try copying over composer.json and composer.lock and run the php artisan commands found in the composer.json






    share|improve this answer













    Try copying over composer.json and composer.lock and run the php artisan commands found in the composer.json







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 16 '18 at 8:44









    JoshJosh

    729112




    729112













    • Thanks for the reply, I gave this a try now and unfortunately no luck.

      – Wes Murray
      Nov 16 '18 at 8:48











    • I would suggest then that you copy all the files from your local env except .env to the server.

      – Josh
      Nov 16 '18 at 8:50













    • In other words, replace all the files on shared hosting again with the local app files?

      – Wes Murray
      Nov 16 '18 at 8:52











    • Yeah except the .env file

      – Josh
      Nov 16 '18 at 8:53











    • What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

      – common sense
      Nov 16 '18 at 8:54



















    • Thanks for the reply, I gave this a try now and unfortunately no luck.

      – Wes Murray
      Nov 16 '18 at 8:48











    • I would suggest then that you copy all the files from your local env except .env to the server.

      – Josh
      Nov 16 '18 at 8:50













    • In other words, replace all the files on shared hosting again with the local app files?

      – Wes Murray
      Nov 16 '18 at 8:52











    • Yeah except the .env file

      – Josh
      Nov 16 '18 at 8:53











    • What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

      – common sense
      Nov 16 '18 at 8:54

















    Thanks for the reply, I gave this a try now and unfortunately no luck.

    – Wes Murray
    Nov 16 '18 at 8:48





    Thanks for the reply, I gave this a try now and unfortunately no luck.

    – Wes Murray
    Nov 16 '18 at 8:48













    I would suggest then that you copy all the files from your local env except .env to the server.

    – Josh
    Nov 16 '18 at 8:50







    I would suggest then that you copy all the files from your local env except .env to the server.

    – Josh
    Nov 16 '18 at 8:50















    In other words, replace all the files on shared hosting again with the local app files?

    – Wes Murray
    Nov 16 '18 at 8:52





    In other words, replace all the files on shared hosting again with the local app files?

    – Wes Murray
    Nov 16 '18 at 8:52













    Yeah except the .env file

    – Josh
    Nov 16 '18 at 8:53





    Yeah except the .env file

    – Josh
    Nov 16 '18 at 8:53













    What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

    – common sense
    Nov 16 '18 at 8:54





    What you mean with "Composer is not supported at all with the current hosting company?" Is it not installed or does the server not meet Composer requirements?

    – common sense
    Nov 16 '18 at 8:54













    0














    Some background:



    PHP5.6 is outdated and not supported anymore by PHP. Therefore a lot of hosters remove this version from theirs servers (at least in Germany). Some already started and others will do beginning of 2019. For my experience hosters have already newer versions available on their servers, which need to be activated manually in the configuration panel by domain.



    For the CLI PHP you can check this by ssh to your server and type php followed by hitting TAB two times. This gave me this:



    php php53 php54 php55 php56 php70 php71 php72



    Composer uses the default /usr/bin/php, which might be symlinked to php56 on your webspace. However, you can call Composer also with any other PHP version by:



    php71 composer.phar



    If your hoster does not support any newer PHP version I would demand it from him for security reasons or migrate to another one ASAP.






    share|improve this answer




























      0














      Some background:



      PHP5.6 is outdated and not supported anymore by PHP. Therefore a lot of hosters remove this version from theirs servers (at least in Germany). Some already started and others will do beginning of 2019. For my experience hosters have already newer versions available on their servers, which need to be activated manually in the configuration panel by domain.



      For the CLI PHP you can check this by ssh to your server and type php followed by hitting TAB two times. This gave me this:



      php php53 php54 php55 php56 php70 php71 php72



      Composer uses the default /usr/bin/php, which might be symlinked to php56 on your webspace. However, you can call Composer also with any other PHP version by:



      php71 composer.phar



      If your hoster does not support any newer PHP version I would demand it from him for security reasons or migrate to another one ASAP.






      share|improve this answer


























        0












        0








        0







        Some background:



        PHP5.6 is outdated and not supported anymore by PHP. Therefore a lot of hosters remove this version from theirs servers (at least in Germany). Some already started and others will do beginning of 2019. For my experience hosters have already newer versions available on their servers, which need to be activated manually in the configuration panel by domain.



        For the CLI PHP you can check this by ssh to your server and type php followed by hitting TAB two times. This gave me this:



        php php53 php54 php55 php56 php70 php71 php72



        Composer uses the default /usr/bin/php, which might be symlinked to php56 on your webspace. However, you can call Composer also with any other PHP version by:



        php71 composer.phar



        If your hoster does not support any newer PHP version I would demand it from him for security reasons or migrate to another one ASAP.






        share|improve this answer













        Some background:



        PHP5.6 is outdated and not supported anymore by PHP. Therefore a lot of hosters remove this version from theirs servers (at least in Germany). Some already started and others will do beginning of 2019. For my experience hosters have already newer versions available on their servers, which need to be activated manually in the configuration panel by domain.



        For the CLI PHP you can check this by ssh to your server and type php followed by hitting TAB two times. This gave me this:



        php php53 php54 php55 php56 php70 php71 php72



        Composer uses the default /usr/bin/php, which might be symlinked to php56 on your webspace. However, you can call Composer also with any other PHP version by:



        php71 composer.phar



        If your hoster does not support any newer PHP version I would demand it from him for security reasons or migrate to another one ASAP.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 16 '18 at 16:34









        common sensecommon sense

        2,45831625




        2,45831625






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334053%2fadvice-for-installing-individual-composer-packages-on-shared-hosting%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()