Laravel Using Stale Files?












0














I have a Laravel project that was generating errors, so I deleted the offending line, pushed the code to the repository, pulled the code onto the production server and retried. However, I'm still getting the exception referencing the line of code which no longer exists.




  1. I checked the production server, and the most recent code is present.

  2. I did composer dumpautoload

  3. I did php artisan clear-compiled

  4. I did php artisan optimize

  5. I did php artisan cache:clear


But the Whoops handler is still giving me errors on files that have clearly changed. What to do?










share|improve this question
























  • Did you try by restarting the server?
    – C2486
    Nov 23 '18 at 18:27










  • No need to restart server. OP confirm that the line is in fact not there.
    – Kyslik
    Nov 23 '18 at 19:57
















0














I have a Laravel project that was generating errors, so I deleted the offending line, pushed the code to the repository, pulled the code onto the production server and retried. However, I'm still getting the exception referencing the line of code which no longer exists.




  1. I checked the production server, and the most recent code is present.

  2. I did composer dumpautoload

  3. I did php artisan clear-compiled

  4. I did php artisan optimize

  5. I did php artisan cache:clear


But the Whoops handler is still giving me errors on files that have clearly changed. What to do?










share|improve this question
























  • Did you try by restarting the server?
    – C2486
    Nov 23 '18 at 18:27










  • No need to restart server. OP confirm that the line is in fact not there.
    – Kyslik
    Nov 23 '18 at 19:57














0












0








0







I have a Laravel project that was generating errors, so I deleted the offending line, pushed the code to the repository, pulled the code onto the production server and retried. However, I'm still getting the exception referencing the line of code which no longer exists.




  1. I checked the production server, and the most recent code is present.

  2. I did composer dumpautoload

  3. I did php artisan clear-compiled

  4. I did php artisan optimize

  5. I did php artisan cache:clear


But the Whoops handler is still giving me errors on files that have clearly changed. What to do?










share|improve this question















I have a Laravel project that was generating errors, so I deleted the offending line, pushed the code to the repository, pulled the code onto the production server and retried. However, I'm still getting the exception referencing the line of code which no longer exists.




  1. I checked the production server, and the most recent code is present.

  2. I did composer dumpautoload

  3. I did php artisan clear-compiled

  4. I did php artisan optimize

  5. I did php artisan cache:clear


But the Whoops handler is still giving me errors on files that have clearly changed. What to do?







laravel composer-php artisan laravel-5.7






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 1:58









Karl Hill

2,28711841




2,28711841










asked Nov 23 '18 at 17:55









mankowitz

374110




374110












  • Did you try by restarting the server?
    – C2486
    Nov 23 '18 at 18:27










  • No need to restart server. OP confirm that the line is in fact not there.
    – Kyslik
    Nov 23 '18 at 19:57


















  • Did you try by restarting the server?
    – C2486
    Nov 23 '18 at 18:27










  • No need to restart server. OP confirm that the line is in fact not there.
    – Kyslik
    Nov 23 '18 at 19:57
















Did you try by restarting the server?
– C2486
Nov 23 '18 at 18:27




Did you try by restarting the server?
– C2486
Nov 23 '18 at 18:27












No need to restart server. OP confirm that the line is in fact not there.
– Kyslik
Nov 23 '18 at 19:57




No need to restart server. OP confirm that the line is in fact not there.
– Kyslik
Nov 23 '18 at 19:57












4 Answers
4






active

oldest

votes


















0














I am normally using these four commands, If I get such errors.



php artisan cache:clear
php artisan route:cache
php artisan view:clear
php artisan config:cache


Here you didn't use php artisan view:clear so I suggest to try this one also






share|improve this answer





















  • ok, I tried all those. no luck.
    – mankowitz
    Nov 23 '18 at 18:16



















0














Try:



composer install --optimize-autoloader --no-dev





share|improve this answer





















  • I tried that. No joy.
    – mankowitz
    Nov 25 '18 at 7:49



















0














You just need to reset the opcode cache if your server having it. You can see here



http://php.net/manual/en/function.opcache-reset.php






share|improve this answer





























    0














    The thing I failed to mention in the question is that the problem was in a queued job. Once I realized that queued jobs don't reset when the code updates, I had to issuse



    php artisan queue:restart


    And then it worked. Thanks for everyone's belp.






    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%2f53451133%2flaravel-using-stale-files%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I am normally using these four commands, If I get such errors.



      php artisan cache:clear
      php artisan route:cache
      php artisan view:clear
      php artisan config:cache


      Here you didn't use php artisan view:clear so I suggest to try this one also






      share|improve this answer





















      • ok, I tried all those. no luck.
        – mankowitz
        Nov 23 '18 at 18:16
















      0














      I am normally using these four commands, If I get such errors.



      php artisan cache:clear
      php artisan route:cache
      php artisan view:clear
      php artisan config:cache


      Here you didn't use php artisan view:clear so I suggest to try this one also






      share|improve this answer





















      • ok, I tried all those. no luck.
        – mankowitz
        Nov 23 '18 at 18:16














      0












      0








      0






      I am normally using these four commands, If I get such errors.



      php artisan cache:clear
      php artisan route:cache
      php artisan view:clear
      php artisan config:cache


      Here you didn't use php artisan view:clear so I suggest to try this one also






      share|improve this answer












      I am normally using these four commands, If I get such errors.



      php artisan cache:clear
      php artisan route:cache
      php artisan view:clear
      php artisan config:cache


      Here you didn't use php artisan view:clear so I suggest to try this one also







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 23 '18 at 18:05









      C2486

      19k32666




      19k32666












      • ok, I tried all those. no luck.
        – mankowitz
        Nov 23 '18 at 18:16


















      • ok, I tried all those. no luck.
        – mankowitz
        Nov 23 '18 at 18:16
















      ok, I tried all those. no luck.
      – mankowitz
      Nov 23 '18 at 18:16




      ok, I tried all those. no luck.
      – mankowitz
      Nov 23 '18 at 18:16













      0














      Try:



      composer install --optimize-autoloader --no-dev





      share|improve this answer





















      • I tried that. No joy.
        – mankowitz
        Nov 25 '18 at 7:49
















      0














      Try:



      composer install --optimize-autoloader --no-dev





      share|improve this answer





















      • I tried that. No joy.
        – mankowitz
        Nov 25 '18 at 7:49














      0












      0








      0






      Try:



      composer install --optimize-autoloader --no-dev





      share|improve this answer












      Try:



      composer install --optimize-autoloader --no-dev






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 23 '18 at 23:45









      Karl Hill

      2,28711841




      2,28711841












      • I tried that. No joy.
        – mankowitz
        Nov 25 '18 at 7:49


















      • I tried that. No joy.
        – mankowitz
        Nov 25 '18 at 7:49
















      I tried that. No joy.
      – mankowitz
      Nov 25 '18 at 7:49




      I tried that. No joy.
      – mankowitz
      Nov 25 '18 at 7:49











      0














      You just need to reset the opcode cache if your server having it. You can see here



      http://php.net/manual/en/function.opcache-reset.php






      share|improve this answer


























        0














        You just need to reset the opcode cache if your server having it. You can see here



        http://php.net/manual/en/function.opcache-reset.php






        share|improve this answer
























          0












          0








          0






          You just need to reset the opcode cache if your server having it. You can see here



          http://php.net/manual/en/function.opcache-reset.php






          share|improve this answer












          You just need to reset the opcode cache if your server having it. You can see here



          http://php.net/manual/en/function.opcache-reset.php







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 24 '18 at 12:01









          Ismoil Shifoev

          1,240711




          1,240711























              0














              The thing I failed to mention in the question is that the problem was in a queued job. Once I realized that queued jobs don't reset when the code updates, I had to issuse



              php artisan queue:restart


              And then it worked. Thanks for everyone's belp.






              share|improve this answer


























                0














                The thing I failed to mention in the question is that the problem was in a queued job. Once I realized that queued jobs don't reset when the code updates, I had to issuse



                php artisan queue:restart


                And then it worked. Thanks for everyone's belp.






                share|improve this answer
























                  0












                  0








                  0






                  The thing I failed to mention in the question is that the problem was in a queued job. Once I realized that queued jobs don't reset when the code updates, I had to issuse



                  php artisan queue:restart


                  And then it worked. Thanks for everyone's belp.






                  share|improve this answer












                  The thing I failed to mention in the question is that the problem was in a queued job. Once I realized that queued jobs don't reset when the code updates, I had to issuse



                  php artisan queue:restart


                  And then it worked. Thanks for everyone's belp.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 4 '18 at 16:06









                  mankowitz

                  374110




                  374110






























                      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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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%2f53451133%2flaravel-using-stale-files%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







                      Popular posts from this blog

                      A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

                      Calculate evaluation metrics using cross_val_predict sklearn

                      Insert data from modal to MySQL (multiple modal on website)