how to run php program that saved in opt/lampp/htdocs
- I installed Xampp in my linux os
- 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
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
- I installed Xampp in my linux os
- 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
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
– Suraj Kumar
Dec 9 '16 at 8:46
add a comment |
- I installed Xampp in my linux os
- 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
- I installed Xampp in my linux os
- 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
12.04
edited Aug 18 '18 at 8:28
InxaneNinja
205
205
asked Jul 21 '14 at 10:25
MikpatelMikpatel
18113
18113
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
– Suraj Kumar
Dec 9 '16 at 8:46
add a comment |
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
add a comment |
4 Answers
4
active
oldest
votes
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.
add a comment |
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.
add a comment |
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
This is not necessary as the default directory is/opt/lmapp/htdocs
not/var/www/htdocs
– Pabi
Jul 21 '14 at 13:01
add a comment |
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
add a comment |
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',
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited Apr 13 '17 at 12:25
Community♦
1
1
answered Jul 21 '14 at 12:50
AFwcxxAFwcxx
3352511
3352511
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Jul 21 '14 at 13:02
answered Jul 21 '14 at 10:39
PabiPabi
5,63933042
5,63933042
add a comment |
add a comment |
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
This is not necessary as the default directory is/opt/lmapp/htdocs
not/var/www/htdocs
– Pabi
Jul 21 '14 at 13:01
add a comment |
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
This is not necessary as the default directory is/opt/lmapp/htdocs
not/var/www/htdocs
– Pabi
Jul 21 '14 at 13:01
add a comment |
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
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
answered Jul 21 '14 at 12:22
PartoParto
9,3411965103
9,3411965103
This is not necessary as the default directory is/opt/lmapp/htdocs
not/var/www/htdocs
– Pabi
Jul 21 '14 at 13:01
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Nov 26 '17 at 8:57
Yashas BharadwajYashas Bharadwaj
116
116
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
This might help you. Refer to this Video : youtube.com/watch?v=3CZoTgx2lgA
– Suraj Kumar
Dec 9 '16 at 8:46