can't find index.html

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

can't find index.html

Postby Jacob L » 14. March 2008 17:08

I can't get localhost to load index.html when I enter it in a browser. I hav the index.html file in applications/xampp/xamppfiles/htdocs. I just keeps opening http://localhost/xampp/index.php when I enter index.html.

can anyone help me with this?

thanks, Jacob
Jacob L
 
Posts: 1
Joined: 14. March 2008 17:03

Postby jmdirc » 15. March 2008 14:25

edit: I misunderstood your question:

the html is actually linking to the php, that is why you keep getting the php and not an html. open the html in a text editor and you will see it is no more than a link
Last edited by jmdirc on 15. March 2008 18:33, edited 3 times in total.
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44

Postby ippei » 15. March 2008 14:54

I'm a total newbie and I have a similar problem. I installed Joomla! to test it and everything is working fine except that when I type in localhost in my browser it doesn't load the index.php file and shows all the content in the htdocs folder instead. Can someone please help me with this? Thanks in advance.
ippei
 
Posts: 6
Joined: 15. March 2008 14:42

Postby jmdirc » 15. March 2008 15:38

ippei wrote:I'm a total newbie and I have a similar problem. I installed Joomla! to test it and everything is working fine except that when I type in localhost in my browser it doesn't load the index.php file and shows all the content in the htdocs folder instead. Can someone please help me with this? Thanks in advance.


I don't see where this should happen. You might try selecting the page you want to view from inside of Joomla and then select the "view site" button.

(not to pimp a software, still, I do like Fetch much better. Down side is, it does cost 25 bucks.)
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44

Postby ippei » 15. March 2008 16:50

jmdirc wrote:I don't see where this should happen. You might try selecting the page you want to view from inside of Joomla and then select the "view site" button.

(not to pimp a software, still, I do like Fetch much better. Down side is, it does cost 25 bucks.)


Hm, you mean to log in as a admin and then from the control panel view the site? The problem is not that I can't load the index.php at all, but the annoying fact that it won't load by itself when I just direct it to the folder (http://localhost) and not the file directly (http://localhost/index.php). I mean shouldn't Apache be able to detect the index.php file and load it? And the same problem remains when I for example click on a link that direct me to a folder like this: "http://localhost/administrator/"
It can't detect the index file and just shows the content of the folder. I can still test the CMS with the problem in affect but it annoys me to no end >_< So, I just thought that maybe I should try asking and see if people know what's wrong. You have no idea at all why this problem occurs?

Fetch? I'll check it out.
ippei
 
Posts: 6
Joined: 15. March 2008 14:42

Postby jmdirc » 15. March 2008 17:29

If your not getting the page by typing in http://localhost/ check the httpd.config file. (don't forget the trailing " / ", that is what directs you further into the file)

In the httpd.conf, is the default address the browser will use to access your files. It is actually something like http://localhost/xampp/index.php in the address bar. You shouldn't have to type all that in though.

on line 176 to 180 of the httpd.conf file:

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Applications/xampp/xamppfiles/htdocs"


----------------
As for "http://localhost/administrator/", there is no such directory thus you should receive an error message.

-------
edit; and since your typing in //localhost/index.php and not getting that file is because the actual php file is not located in that directory. The html file in that directory is actually linking to the php in another directory.

I hope all this makes sence.
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44

Postby ippei » 15. March 2008 18:04

jmdirc wrote:If your not getting the page by typing in http://localhost/ check the httpd.config file. (don't forget the trailing " / ", that is what directs you further into the file)

In the httpd.conf, is the default address the browser will use to access your files. It is actually something like http://localhost/xampp/index.php in the address bar. You shouldn't have to type all that in though.

on line 176 to 180 of the httpd.conf file:

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Applications/xampp/xamppfiles/htdocs"


----------------
As for "http://localhost/administrator/", there is no such directory thus you should receive an error message.

-------
edit; and since your typing in index.php and not getting that file is because the actual php file is not located in that directory. The html file in that directory is actually linking to the php in another directory.

I hope all this makes sence.


Thanks for taking your time. I solved the problem just now! I just need to add:

"DirectoryIndex index.html index.html.var index.php"

to the httpd.conf file. I think the script is telling Apache to regard index.php file as a directory index as well I guess. Now the problems solved ^^
ippei
 
Posts: 6
Joined: 15. March 2008 14:42

Postby jmdirc » 15. March 2008 18:17

I don't think so. When you type in the php file, since it isn't in that directory, I think it is loading the ftp directory tree.

line 241 to 243 should read:

<IfModule dir_module>
DirectoryIndex index.html index.php index.htmls index.htm
</IfModule>


basically, it should be there already
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44

Postby ippei » 15. March 2008 18:38

jmdirc wrote:I don't think so. When you type in the php file, since it isn't in that directory, I think it is loading the ftp directory tree.

line 241 to 243 should read:

<IfModule dir_module>
DirectoryIndex index.html index.php index.htmls index.htm
</IfModule>


basically, it should be there already


Well, that wasn't the case in my httpd file. So, even if the index.php file was there it didn't load. What was initailly in my httpd file was:

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>


I don't know why my version was lacking those variables and had me add them to it manually. I checked the integrity of the apache zip-fil and the md5 hash code was correct. It's all very wierd.
ippei
 
Posts: 6
Joined: 15. March 2008 14:42

Postby jmdirc » 15. March 2008 18:47

what version of xampp do you have?
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44

Postby ippei » 15. March 2008 19:42

jmdirc wrote:what version of xampp do you have?


O_O Wait. I just saw the the heading of this section is xampp for mac os x. I'm not even a mac user. I think I'm in the wrong section? I'm not using xampp at all. I downloaded Apache, PHP and MySQL seperately and installed them separately. Thus I have to add and fix codes. I guess it's much easier for a beginner like me to use xampp since it's already in a package, but I somehow missed there's something like xampp. I should have spared myself so much trouble. *embarassed*

I'm using Apache http server 2.2.8
ippei
 
Posts: 6
Joined: 15. March 2008 14:42

Postby jmdirc » 15. March 2008 21:14

It is still the same. With the exception of a better os - ahem. :D
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44

Postby ippei » 15. March 2008 23:30

jmdirc wrote:It is still the same. With the exception of a better os - ahem. :D


People do say that. But I'm too lazy to switch and learn a new os (^_^)

Well, I'm glad everything is working now. Just need to learn how to make joomla templates. It's a never ending story ;__;
ippei
 
Posts: 6
Joined: 15. March 2008 14:42

Postby jmdirc » 16. March 2008 01:20

You got that right.
User avatar
jmdirc
 
Posts: 154
Joined: 10. February 2008 22:44


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 15 guests