Results 1 to 7 of 7
I'm trying to set up a localhost to play around with .php files.
I used two tutorials under askmegabe at youtube. (can't post the links). It looks like everything is ...
- 09-10-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
Where would I put my .php files on linux?
I'm trying to set up a localhost to play around with .php files.
I used two tutorials under askmegabe at youtube. (can't post the links). It looks like everything is set-up correctly.
127.0.0.1 (localhost) says "it works"
localhost/phpmyadmin is my MySQL (I can login)
Now my problem is I am newer to Linux and I'm having a hard time figuring out where I would even put these .php files.
I've been using Google and something tells me www/var is an important location and it needs to go inside this location?
How would I get to this folder or location or if I'm doing everything wrong what needs to happen next?
- 09-10-2011 #2
tHi and welcome to the forums.
What Linux distribution are you using? If it's Ubuntu, then it's probably /var/www.
- 09-11-2011 #3Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
11.04 Ubuntu and during installation it was /var/www, but I'm wondering how do I get to this location in Ubuntu? Is this where I would put my .php file as well?
I started using Ubuntu about a month ago. I'm still having a very hard time finding files and such.
- 09-11-2011 #4Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,946
You can copy files to the /var/www directory using the file manager. I haven't used Ubuntu 11.04 but in previous versions of Ubuntu, there was a places tab in the upper left of the screen.
Do you mean the info.php and other files you create? They would go in the /var/www directory, usually there is a sub-directory there called html or htdocs. Put your files there. You should have the Apache index.html there already.
- 09-11-2011 #5Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
I don't care what the people on Linuxforums.org say about you. I think you're an alright guy.
I am so grateful for this help. Especially the index.html. I was trying to install an FTP just to try to figure this out when all I needed to do was find the folder this information was stored in. I need to figure out what all those files are in my FTP then.
- 09-11-2011 #6Just Joined!
- Join Date
- Sep 2011
- Posts
- 18
one more quick question. Would you happen to know why I can't edit the index.html file? It's read only currently. Do I need some type of permissions set-up?
- 09-11-2011 #7Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,946
If it's read-only that's why you can't edit it. You need to make it writeable. Got to the directory /var/www/html and as root do: chmod 644 index.html. This should give read/write to root and read to users and others. If you want something else, you can get info on the chmod command by typing in a terminal: man chmod


Reply With Quote
