how to run php program that saved in opt/lampp/htdocs











up vote
3
down vote

favorite
1













  1. I installed Xampp in my linux os

  2. I've also written a php program in gedit and saved it in /opt/lampp/htdocs


The problem is I don't know how to run the php file I saved in /opt/lampp/htdocs










share|improve this question
























  • This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
    – Suraj Kumar
    Dec 9 '16 at 8:46















up vote
3
down vote

favorite
1













  1. I installed Xampp in my linux os

  2. I've also written a php program in gedit and saved it in /opt/lampp/htdocs


The problem is I don't know how to run the php file I saved in /opt/lampp/htdocs










share|improve this question
























  • This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
    – Suraj Kumar
    Dec 9 '16 at 8:46













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1






  1. I installed Xampp in my linux os

  2. I've also written a php program in gedit and saved it in /opt/lampp/htdocs


The problem is I don't know how to run the php file I saved in /opt/lampp/htdocs










share|improve this question
















  1. I installed Xampp in my linux os

  2. I've also written a php program in gedit and saved it in /opt/lampp/htdocs


The problem is I don't know how to run the php file I saved in /opt/lampp/htdocs







12.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 18 at 8:28









InxaneNinja

205




205










asked Jul 21 '14 at 10:25









Mikpatel

18113




18113












  • This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
    – Suraj Kumar
    Dec 9 '16 at 8:46


















  • This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
    – Suraj Kumar
    Dec 9 '16 at 8:46
















This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
– Suraj Kumar
Dec 9 '16 at 8:46




This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
– Suraj Kumar
Dec 9 '16 at 8:46










4 Answers
4






active

oldest

votes

















up vote
0
down vote













Create a symbolic link in your /var/www folder pointing to /opt/lampp/htdocs.



mkdir /var/www/htdocs
ln -s /var/www/htdocs /opt/lampp/htdocs


From there just go to localhost/htdocs






share|improve this answer





















  • This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
    – Pabi
    Jul 21 '14 at 13:01




















up vote
0
down vote













First. You gotta check if your lampp server is running or not.



Either way. Open your terminal with pressing Alt+Ctrl+t.



type sudo /opt/lampp/lampp start



Something like this should appear:



Starting XAMPP for Linux 1.8.3-4...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.


Then, do what Pabi suggest.



localhost/yourfile.php in your browser bar.






share|improve this answer






























    up vote
    0
    down vote













    If lampp is not already running start it from a Terminal crtl + alt + t type:



    sudo /opt/lampp/lampp start



    Then open a browser and go to the url localhost/yourFile.php.

    Replace yourFile.php with the name of your php file.



    Or name the php file index.php and just enter localhost in the browser.






    share|improve this answer






























      up vote
      0
      down vote













      firstly you will have to start the local host as mentioned



      sudo /opt/lampp/lampp start


      you will see the output on the termminal saying



      Starting XAMPP for Linux 7.1.9-0...
      XAMPP: Starting Apache...ok.
      XAMPP: Starting MySQL...ok.
      XAMPP: Starting ProFTPD...ok.


      you will have to check the permissions given to htdocs folder
      to make life simpler try this



      cd /opt/lampp


      this will redirect you to the lampp folder , here change the permission of the document root , i.e permissions of htdocs



      sudo chmod 777 htdocs


      go into the folder



      cd htdocs


      now make your own document root file to store all your files



      mkdir yourfoldername


      now it is as simple as copying the files into this folder , now open your browser and type in



      -> in your browser
      localhost



      you will see -> localhost/dashboard/
      remove the dashboard part and replace with



      -> localhost/yourfoldername



      and here click on the file you put inside the folder you had made in htdocs , and there you go . you can run the php file from here






      share|improve this answer





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        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%2faskubuntu.com%2fquestions%2f500573%2fhow-to-run-php-program-that-saved-in-opt-lampp-htdocs%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








        up vote
        0
        down vote













        Create a symbolic link in your /var/www folder pointing to /opt/lampp/htdocs.



        mkdir /var/www/htdocs
        ln -s /var/www/htdocs /opt/lampp/htdocs


        From there just go to localhost/htdocs






        share|improve this answer





















        • This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
          – Pabi
          Jul 21 '14 at 13:01

















        up vote
        0
        down vote













        Create a symbolic link in your /var/www folder pointing to /opt/lampp/htdocs.



        mkdir /var/www/htdocs
        ln -s /var/www/htdocs /opt/lampp/htdocs


        From there just go to localhost/htdocs






        share|improve this answer





















        • This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
          – Pabi
          Jul 21 '14 at 13:01















        up vote
        0
        down vote










        up vote
        0
        down vote









        Create a symbolic link in your /var/www folder pointing to /opt/lampp/htdocs.



        mkdir /var/www/htdocs
        ln -s /var/www/htdocs /opt/lampp/htdocs


        From there just go to localhost/htdocs






        share|improve this answer












        Create a symbolic link in your /var/www folder pointing to /opt/lampp/htdocs.



        mkdir /var/www/htdocs
        ln -s /var/www/htdocs /opt/lampp/htdocs


        From there just go to localhost/htdocs







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 21 '14 at 12:22









        Parto

        9,2611965103




        9,2611965103












        • This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
          – Pabi
          Jul 21 '14 at 13:01




















        • This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
          – Pabi
          Jul 21 '14 at 13:01


















        This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
        – Pabi
        Jul 21 '14 at 13:01






        This is not necessary as the default directory is /opt/lmapp/htdocs not /var/www/htdocs
        – Pabi
        Jul 21 '14 at 13:01














        up vote
        0
        down vote













        First. You gotta check if your lampp server is running or not.



        Either way. Open your terminal with pressing Alt+Ctrl+t.



        type sudo /opt/lampp/lampp start



        Something like this should appear:



        Starting XAMPP for Linux 1.8.3-4...
        XAMPP: Starting Apache...ok.
        XAMPP: Starting MySQL...ok.
        XAMPP: Starting ProFTPD...ok.


        Then, do what Pabi suggest.



        localhost/yourfile.php in your browser bar.






        share|improve this answer



























          up vote
          0
          down vote













          First. You gotta check if your lampp server is running or not.



          Either way. Open your terminal with pressing Alt+Ctrl+t.



          type sudo /opt/lampp/lampp start



          Something like this should appear:



          Starting XAMPP for Linux 1.8.3-4...
          XAMPP: Starting Apache...ok.
          XAMPP: Starting MySQL...ok.
          XAMPP: Starting ProFTPD...ok.


          Then, do what Pabi suggest.



          localhost/yourfile.php in your browser bar.






          share|improve this answer

























            up vote
            0
            down vote










            up vote
            0
            down vote









            First. You gotta check if your lampp server is running or not.



            Either way. Open your terminal with pressing Alt+Ctrl+t.



            type sudo /opt/lampp/lampp start



            Something like this should appear:



            Starting XAMPP for Linux 1.8.3-4...
            XAMPP: Starting Apache...ok.
            XAMPP: Starting MySQL...ok.
            XAMPP: Starting ProFTPD...ok.


            Then, do what Pabi suggest.



            localhost/yourfile.php in your browser bar.






            share|improve this answer














            First. You gotta check if your lampp server is running or not.



            Either way. Open your terminal with pressing Alt+Ctrl+t.



            type sudo /opt/lampp/lampp start



            Something like this should appear:



            Starting XAMPP for Linux 1.8.3-4...
            XAMPP: Starting Apache...ok.
            XAMPP: Starting MySQL...ok.
            XAMPP: Starting ProFTPD...ok.


            Then, do what Pabi suggest.



            localhost/yourfile.php in your browser bar.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:25









            Community

            1




            1










            answered Jul 21 '14 at 12:50









            AFwcxx

            3252511




            3252511






















                up vote
                0
                down vote













                If lampp is not already running start it from a Terminal crtl + alt + t type:



                sudo /opt/lampp/lampp start



                Then open a browser and go to the url localhost/yourFile.php.

                Replace yourFile.php with the name of your php file.



                Or name the php file index.php and just enter localhost in the browser.






                share|improve this answer



























                  up vote
                  0
                  down vote













                  If lampp is not already running start it from a Terminal crtl + alt + t type:



                  sudo /opt/lampp/lampp start



                  Then open a browser and go to the url localhost/yourFile.php.

                  Replace yourFile.php with the name of your php file.



                  Or name the php file index.php and just enter localhost in the browser.






                  share|improve this answer

























                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    If lampp is not already running start it from a Terminal crtl + alt + t type:



                    sudo /opt/lampp/lampp start



                    Then open a browser and go to the url localhost/yourFile.php.

                    Replace yourFile.php with the name of your php file.



                    Or name the php file index.php and just enter localhost in the browser.






                    share|improve this answer














                    If lampp is not already running start it from a Terminal crtl + alt + t type:



                    sudo /opt/lampp/lampp start



                    Then open a browser and go to the url localhost/yourFile.php.

                    Replace yourFile.php with the name of your php file.



                    Or name the php file index.php and just enter localhost in the browser.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Jul 21 '14 at 13:02

























                    answered Jul 21 '14 at 10:39









                    Pabi

                    5,58433042




                    5,58433042






















                        up vote
                        0
                        down vote













                        firstly you will have to start the local host as mentioned



                        sudo /opt/lampp/lampp start


                        you will see the output on the termminal saying



                        Starting XAMPP for Linux 7.1.9-0...
                        XAMPP: Starting Apache...ok.
                        XAMPP: Starting MySQL...ok.
                        XAMPP: Starting ProFTPD...ok.


                        you will have to check the permissions given to htdocs folder
                        to make life simpler try this



                        cd /opt/lampp


                        this will redirect you to the lampp folder , here change the permission of the document root , i.e permissions of htdocs



                        sudo chmod 777 htdocs


                        go into the folder



                        cd htdocs


                        now make your own document root file to store all your files



                        mkdir yourfoldername


                        now it is as simple as copying the files into this folder , now open your browser and type in



                        -> in your browser
                        localhost



                        you will see -> localhost/dashboard/
                        remove the dashboard part and replace with



                        -> localhost/yourfoldername



                        and here click on the file you put inside the folder you had made in htdocs , and there you go . you can run the php file from here






                        share|improve this answer

























                          up vote
                          0
                          down vote













                          firstly you will have to start the local host as mentioned



                          sudo /opt/lampp/lampp start


                          you will see the output on the termminal saying



                          Starting XAMPP for Linux 7.1.9-0...
                          XAMPP: Starting Apache...ok.
                          XAMPP: Starting MySQL...ok.
                          XAMPP: Starting ProFTPD...ok.


                          you will have to check the permissions given to htdocs folder
                          to make life simpler try this



                          cd /opt/lampp


                          this will redirect you to the lampp folder , here change the permission of the document root , i.e permissions of htdocs



                          sudo chmod 777 htdocs


                          go into the folder



                          cd htdocs


                          now make your own document root file to store all your files



                          mkdir yourfoldername


                          now it is as simple as copying the files into this folder , now open your browser and type in



                          -> in your browser
                          localhost



                          you will see -> localhost/dashboard/
                          remove the dashboard part and replace with



                          -> localhost/yourfoldername



                          and here click on the file you put inside the folder you had made in htdocs , and there you go . you can run the php file from here






                          share|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            firstly you will have to start the local host as mentioned



                            sudo /opt/lampp/lampp start


                            you will see the output on the termminal saying



                            Starting XAMPP for Linux 7.1.9-0...
                            XAMPP: Starting Apache...ok.
                            XAMPP: Starting MySQL...ok.
                            XAMPP: Starting ProFTPD...ok.


                            you will have to check the permissions given to htdocs folder
                            to make life simpler try this



                            cd /opt/lampp


                            this will redirect you to the lampp folder , here change the permission of the document root , i.e permissions of htdocs



                            sudo chmod 777 htdocs


                            go into the folder



                            cd htdocs


                            now make your own document root file to store all your files



                            mkdir yourfoldername


                            now it is as simple as copying the files into this folder , now open your browser and type in



                            -> in your browser
                            localhost



                            you will see -> localhost/dashboard/
                            remove the dashboard part and replace with



                            -> localhost/yourfoldername



                            and here click on the file you put inside the folder you had made in htdocs , and there you go . you can run the php file from here






                            share|improve this answer












                            firstly you will have to start the local host as mentioned



                            sudo /opt/lampp/lampp start


                            you will see the output on the termminal saying



                            Starting XAMPP for Linux 7.1.9-0...
                            XAMPP: Starting Apache...ok.
                            XAMPP: Starting MySQL...ok.
                            XAMPP: Starting ProFTPD...ok.


                            you will have to check the permissions given to htdocs folder
                            to make life simpler try this



                            cd /opt/lampp


                            this will redirect you to the lampp folder , here change the permission of the document root , i.e permissions of htdocs



                            sudo chmod 777 htdocs


                            go into the folder



                            cd htdocs


                            now make your own document root file to store all your files



                            mkdir yourfoldername


                            now it is as simple as copying the files into this folder , now open your browser and type in



                            -> in your browser
                            localhost



                            you will see -> localhost/dashboard/
                            remove the dashboard part and replace with



                            -> localhost/yourfoldername



                            and here click on the file you put inside the folder you had made in htdocs , and there you go . you can run the php file from here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 26 '17 at 8:57









                            Yashas Bharadwaj

                            116




                            116






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • 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%2faskubuntu.com%2fquestions%2f500573%2fhow-to-run-php-program-that-saved-in-opt-lampp-htdocs%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

                                How did Captain America manage to do this?

                                迪纳利

                                南乌拉尔铁路局