Laravel - Artisan not working









up vote
18
down vote

favorite
4












I'm aware of the other questions out there, but they are different to my situation.



I installed a fresh copy of my own laravel, and I tried running php artisan list, which works.



Now, I have a colleague who has installed a copy of laravel himself, and he pushes his entire directory onto a git repository. I pulled the entire branch off the repository, and tried running php artisan list, but nothing happens this time. I mean, literally, nothing happens.



Any ideas as to why this is happening?










share|improve this question



















  • 1




    Have you run composer install after cloning the repo? That said, I wouldn't expect nothing to happen if the error was as bad as being unable to load in files (though it could depend on your display_error settings).
    – alexrussell
    Feb 19 '14 at 14:15










  • UNIX/Windows/OSX? Are you pushing composer.phar too?
    – Sergiu Paraschiv
    Feb 19 '14 at 14:16










  • @Sergiu I'm using OSX.
    – He Hui
    Feb 19 '14 at 14:19










  • @Alexrussell I'm supposed to run composer install? Sorry I'm new to working with laravel/command line in php
    – He Hui
    Feb 19 '14 at 14:19






  • 1




    Yes. composer install downloads the dependencies you defined in composer.json in your vendor folder that you do not push to git. Artisan is part of the laravel package that's a dependency.
    – Sergiu Paraschiv
    Feb 19 '14 at 14:27















up vote
18
down vote

favorite
4












I'm aware of the other questions out there, but they are different to my situation.



I installed a fresh copy of my own laravel, and I tried running php artisan list, which works.



Now, I have a colleague who has installed a copy of laravel himself, and he pushes his entire directory onto a git repository. I pulled the entire branch off the repository, and tried running php artisan list, but nothing happens this time. I mean, literally, nothing happens.



Any ideas as to why this is happening?










share|improve this question



















  • 1




    Have you run composer install after cloning the repo? That said, I wouldn't expect nothing to happen if the error was as bad as being unable to load in files (though it could depend on your display_error settings).
    – alexrussell
    Feb 19 '14 at 14:15










  • UNIX/Windows/OSX? Are you pushing composer.phar too?
    – Sergiu Paraschiv
    Feb 19 '14 at 14:16










  • @Sergiu I'm using OSX.
    – He Hui
    Feb 19 '14 at 14:19










  • @Alexrussell I'm supposed to run composer install? Sorry I'm new to working with laravel/command line in php
    – He Hui
    Feb 19 '14 at 14:19






  • 1




    Yes. composer install downloads the dependencies you defined in composer.json in your vendor folder that you do not push to git. Artisan is part of the laravel package that's a dependency.
    – Sergiu Paraschiv
    Feb 19 '14 at 14:27













up vote
18
down vote

favorite
4









up vote
18
down vote

favorite
4






4





I'm aware of the other questions out there, but they are different to my situation.



I installed a fresh copy of my own laravel, and I tried running php artisan list, which works.



Now, I have a colleague who has installed a copy of laravel himself, and he pushes his entire directory onto a git repository. I pulled the entire branch off the repository, and tried running php artisan list, but nothing happens this time. I mean, literally, nothing happens.



Any ideas as to why this is happening?










share|improve this question















I'm aware of the other questions out there, but they are different to my situation.



I installed a fresh copy of my own laravel, and I tried running php artisan list, which works.



Now, I have a colleague who has installed a copy of laravel himself, and he pushes his entire directory onto a git repository. I pulled the entire branch off the repository, and tried running php artisan list, but nothing happens this time. I mean, literally, nothing happens.



Any ideas as to why this is happening?







php git laravel laravel-4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 23 '17 at 12:26









Community

11




11










asked Feb 19 '14 at 14:07









He Hui

1,38441841




1,38441841







  • 1




    Have you run composer install after cloning the repo? That said, I wouldn't expect nothing to happen if the error was as bad as being unable to load in files (though it could depend on your display_error settings).
    – alexrussell
    Feb 19 '14 at 14:15










  • UNIX/Windows/OSX? Are you pushing composer.phar too?
    – Sergiu Paraschiv
    Feb 19 '14 at 14:16










  • @Sergiu I'm using OSX.
    – He Hui
    Feb 19 '14 at 14:19










  • @Alexrussell I'm supposed to run composer install? Sorry I'm new to working with laravel/command line in php
    – He Hui
    Feb 19 '14 at 14:19






  • 1




    Yes. composer install downloads the dependencies you defined in composer.json in your vendor folder that you do not push to git. Artisan is part of the laravel package that's a dependency.
    – Sergiu Paraschiv
    Feb 19 '14 at 14:27













  • 1




    Have you run composer install after cloning the repo? That said, I wouldn't expect nothing to happen if the error was as bad as being unable to load in files (though it could depend on your display_error settings).
    – alexrussell
    Feb 19 '14 at 14:15










  • UNIX/Windows/OSX? Are you pushing composer.phar too?
    – Sergiu Paraschiv
    Feb 19 '14 at 14:16










  • @Sergiu I'm using OSX.
    – He Hui
    Feb 19 '14 at 14:19










  • @Alexrussell I'm supposed to run composer install? Sorry I'm new to working with laravel/command line in php
    – He Hui
    Feb 19 '14 at 14:19






  • 1




    Yes. composer install downloads the dependencies you defined in composer.json in your vendor folder that you do not push to git. Artisan is part of the laravel package that's a dependency.
    – Sergiu Paraschiv
    Feb 19 '14 at 14:27








1




1




Have you run composer install after cloning the repo? That said, I wouldn't expect nothing to happen if the error was as bad as being unable to load in files (though it could depend on your display_error settings).
– alexrussell
Feb 19 '14 at 14:15




Have you run composer install after cloning the repo? That said, I wouldn't expect nothing to happen if the error was as bad as being unable to load in files (though it could depend on your display_error settings).
– alexrussell
Feb 19 '14 at 14:15












UNIX/Windows/OSX? Are you pushing composer.phar too?
– Sergiu Paraschiv
Feb 19 '14 at 14:16




UNIX/Windows/OSX? Are you pushing composer.phar too?
– Sergiu Paraschiv
Feb 19 '14 at 14:16












@Sergiu I'm using OSX.
– He Hui
Feb 19 '14 at 14:19




@Sergiu I'm using OSX.
– He Hui
Feb 19 '14 at 14:19












@Alexrussell I'm supposed to run composer install? Sorry I'm new to working with laravel/command line in php
– He Hui
Feb 19 '14 at 14:19




@Alexrussell I'm supposed to run composer install? Sorry I'm new to working with laravel/command line in php
– He Hui
Feb 19 '14 at 14:19




1




1




Yes. composer install downloads the dependencies you defined in composer.json in your vendor folder that you do not push to git. Artisan is part of the laravel package that's a dependency.
– Sergiu Paraschiv
Feb 19 '14 at 14:27





Yes. composer install downloads the dependencies you defined in composer.json in your vendor folder that you do not push to git. Artisan is part of the laravel package that's a dependency.
– Sergiu Paraschiv
Feb 19 '14 at 14:27













5 Answers
5






active

oldest

votes

















up vote
17
down vote



accepted










Generally speaking, the vendor directory is not committed to VCS, as such, doing a clone on a standard Laravel app won't include all its dependencies.



Once you have cloned, doing composer install (or composer update if you want the latest packages as a developer) will fetch the dependencies and allow your app to work.






share|improve this answer



























    up vote
    5
    down vote













    My artisan was not working because i had the following lines in my routes.php



    if(!isset($_SESSION['c_id'])) 
    header("Location: /login_page.php");
    exit();



    I simply commented the exit(). So my code becomes as follows



    if(!isset($_SESSION['c_id'])) 
    header("Location: /login_page.php");
    // exit();






    share|improve this answer



























      up vote
      4
      down vote













      You need to run composer install, so the composer refresh all dependencies, artisan's begin on the middle. That should do the job!






      share|improve this answer



























        up vote
        1
        down vote













        Just to point out some thing to anyone struggling with artisan, as this answer is 1st link in google to artisan CLI empty line:



        It will print blank line whenever some error happens, even if you have all dependencies installed with composer install. And it won't tell you exactly what is wrong. I couldn't figure it out until I put into artisan file in the root directory this:



        ini_set('display_errors',1);
        error_reporting(-1);


        That forced artisan CLI to show error message and therefore I was able to fix it (my .env file was broken).



        Hope this helps someone.






        share|improve this answer



























          up vote
          0
          down vote













          In my case problem was to connect artisan with database (migrates) i.e. the command



          $php artisan migrate


          was not working.



          I was running laravel project on 8888 port.
          In this case I updated .env file as:
          DB_HOST=localhost to DB_HOST=localhost to DB_HOST=127.0.0.1
          and DB_PORT=3306 to DB_PORT=8889



          Cleared cache by running artisan command and run the migrates:



          php artisan config:clear
          php artisan migrate





          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',
            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%2f21882897%2flaravel-artisan-not-working%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            17
            down vote



            accepted










            Generally speaking, the vendor directory is not committed to VCS, as such, doing a clone on a standard Laravel app won't include all its dependencies.



            Once you have cloned, doing composer install (or composer update if you want the latest packages as a developer) will fetch the dependencies and allow your app to work.






            share|improve this answer
























              up vote
              17
              down vote



              accepted










              Generally speaking, the vendor directory is not committed to VCS, as such, doing a clone on a standard Laravel app won't include all its dependencies.



              Once you have cloned, doing composer install (or composer update if you want the latest packages as a developer) will fetch the dependencies and allow your app to work.






              share|improve this answer






















                up vote
                17
                down vote



                accepted







                up vote
                17
                down vote



                accepted






                Generally speaking, the vendor directory is not committed to VCS, as such, doing a clone on a standard Laravel app won't include all its dependencies.



                Once you have cloned, doing composer install (or composer update if you want the latest packages as a developer) will fetch the dependencies and allow your app to work.






                share|improve this answer












                Generally speaking, the vendor directory is not committed to VCS, as such, doing a clone on a standard Laravel app won't include all its dependencies.



                Once you have cloned, doing composer install (or composer update if you want the latest packages as a developer) will fetch the dependencies and allow your app to work.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 19 '14 at 15:16









                alexrussell

                8,39432540




                8,39432540






















                    up vote
                    5
                    down vote













                    My artisan was not working because i had the following lines in my routes.php



                    if(!isset($_SESSION['c_id'])) 
                    header("Location: /login_page.php");
                    exit();



                    I simply commented the exit(). So my code becomes as follows



                    if(!isset($_SESSION['c_id'])) 
                    header("Location: /login_page.php");
                    // exit();






                    share|improve this answer
























                      up vote
                      5
                      down vote













                      My artisan was not working because i had the following lines in my routes.php



                      if(!isset($_SESSION['c_id'])) 
                      header("Location: /login_page.php");
                      exit();



                      I simply commented the exit(). So my code becomes as follows



                      if(!isset($_SESSION['c_id'])) 
                      header("Location: /login_page.php");
                      // exit();






                      share|improve this answer






















                        up vote
                        5
                        down vote










                        up vote
                        5
                        down vote









                        My artisan was not working because i had the following lines in my routes.php



                        if(!isset($_SESSION['c_id'])) 
                        header("Location: /login_page.php");
                        exit();



                        I simply commented the exit(). So my code becomes as follows



                        if(!isset($_SESSION['c_id'])) 
                        header("Location: /login_page.php");
                        // exit();






                        share|improve this answer












                        My artisan was not working because i had the following lines in my routes.php



                        if(!isset($_SESSION['c_id'])) 
                        header("Location: /login_page.php");
                        exit();



                        I simply commented the exit(). So my code becomes as follows



                        if(!isset($_SESSION['c_id'])) 
                        header("Location: /login_page.php");
                        // exit();







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered May 23 '16 at 6:35









                        Himanshu

                        10017




                        10017




















                            up vote
                            4
                            down vote













                            You need to run composer install, so the composer refresh all dependencies, artisan's begin on the middle. That should do the job!






                            share|improve this answer
























                              up vote
                              4
                              down vote













                              You need to run composer install, so the composer refresh all dependencies, artisan's begin on the middle. That should do the job!






                              share|improve this answer






















                                up vote
                                4
                                down vote










                                up vote
                                4
                                down vote









                                You need to run composer install, so the composer refresh all dependencies, artisan's begin on the middle. That should do the job!






                                share|improve this answer












                                You need to run composer install, so the composer refresh all dependencies, artisan's begin on the middle. That should do the job!







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Feb 19 '14 at 14:44









                                Dennis Braga

                                86311535




                                86311535




















                                    up vote
                                    1
                                    down vote













                                    Just to point out some thing to anyone struggling with artisan, as this answer is 1st link in google to artisan CLI empty line:



                                    It will print blank line whenever some error happens, even if you have all dependencies installed with composer install. And it won't tell you exactly what is wrong. I couldn't figure it out until I put into artisan file in the root directory this:



                                    ini_set('display_errors',1);
                                    error_reporting(-1);


                                    That forced artisan CLI to show error message and therefore I was able to fix it (my .env file was broken).



                                    Hope this helps someone.






                                    share|improve this answer
























                                      up vote
                                      1
                                      down vote













                                      Just to point out some thing to anyone struggling with artisan, as this answer is 1st link in google to artisan CLI empty line:



                                      It will print blank line whenever some error happens, even if you have all dependencies installed with composer install. And it won't tell you exactly what is wrong. I couldn't figure it out until I put into artisan file in the root directory this:



                                      ini_set('display_errors',1);
                                      error_reporting(-1);


                                      That forced artisan CLI to show error message and therefore I was able to fix it (my .env file was broken).



                                      Hope this helps someone.






                                      share|improve this answer






















                                        up vote
                                        1
                                        down vote










                                        up vote
                                        1
                                        down vote









                                        Just to point out some thing to anyone struggling with artisan, as this answer is 1st link in google to artisan CLI empty line:



                                        It will print blank line whenever some error happens, even if you have all dependencies installed with composer install. And it won't tell you exactly what is wrong. I couldn't figure it out until I put into artisan file in the root directory this:



                                        ini_set('display_errors',1);
                                        error_reporting(-1);


                                        That forced artisan CLI to show error message and therefore I was able to fix it (my .env file was broken).



                                        Hope this helps someone.






                                        share|improve this answer












                                        Just to point out some thing to anyone struggling with artisan, as this answer is 1st link in google to artisan CLI empty line:



                                        It will print blank line whenever some error happens, even if you have all dependencies installed with composer install. And it won't tell you exactly what is wrong. I couldn't figure it out until I put into artisan file in the root directory this:



                                        ini_set('display_errors',1);
                                        error_reporting(-1);


                                        That forced artisan CLI to show error message and therefore I was able to fix it (my .env file was broken).



                                        Hope this helps someone.







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Mar 7 at 11:46









                                        pixelgoo

                                        364




                                        364




















                                            up vote
                                            0
                                            down vote













                                            In my case problem was to connect artisan with database (migrates) i.e. the command



                                            $php artisan migrate


                                            was not working.



                                            I was running laravel project on 8888 port.
                                            In this case I updated .env file as:
                                            DB_HOST=localhost to DB_HOST=localhost to DB_HOST=127.0.0.1
                                            and DB_PORT=3306 to DB_PORT=8889



                                            Cleared cache by running artisan command and run the migrates:



                                            php artisan config:clear
                                            php artisan migrate





                                            share|improve this answer
























                                              up vote
                                              0
                                              down vote













                                              In my case problem was to connect artisan with database (migrates) i.e. the command



                                              $php artisan migrate


                                              was not working.



                                              I was running laravel project on 8888 port.
                                              In this case I updated .env file as:
                                              DB_HOST=localhost to DB_HOST=localhost to DB_HOST=127.0.0.1
                                              and DB_PORT=3306 to DB_PORT=8889



                                              Cleared cache by running artisan command and run the migrates:



                                              php artisan config:clear
                                              php artisan migrate





                                              share|improve this answer






















                                                up vote
                                                0
                                                down vote










                                                up vote
                                                0
                                                down vote









                                                In my case problem was to connect artisan with database (migrates) i.e. the command



                                                $php artisan migrate


                                                was not working.



                                                I was running laravel project on 8888 port.
                                                In this case I updated .env file as:
                                                DB_HOST=localhost to DB_HOST=localhost to DB_HOST=127.0.0.1
                                                and DB_PORT=3306 to DB_PORT=8889



                                                Cleared cache by running artisan command and run the migrates:



                                                php artisan config:clear
                                                php artisan migrate





                                                share|improve this answer












                                                In my case problem was to connect artisan with database (migrates) i.e. the command



                                                $php artisan migrate


                                                was not working.



                                                I was running laravel project on 8888 port.
                                                In this case I updated .env file as:
                                                DB_HOST=localhost to DB_HOST=localhost to DB_HOST=127.0.0.1
                                                and DB_PORT=3306 to DB_PORT=8889



                                                Cleared cache by running artisan command and run the migrates:



                                                php artisan config:clear
                                                php artisan migrate






                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Nov 10 at 22:03









                                                Zia

                                                213




                                                213



























                                                     

                                                    draft saved


                                                    draft discarded















































                                                     


                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function ()
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f21882897%2flaravel-artisan-not-working%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







                                                    這個網誌中的熱門文章

                                                    What does pagestruct do in Eviews?

                                                    Dutch intervention in Lombok and Karangasem

                                                    Channel Islands