calling up web content problems

Alles, was den Apache betrifft, kann hier besprochen werden.

calling up web content problems

Postby SNW » 17. February 2011 07:48

I am trying to learn PHP for the first time, I have installed XAMPP and checked the status on http://localhost and everything is working as they should be. But when I tried to call up documents I have saved on \xampp\htdocs, and called it up by typing http://localhost/sendingtext.php (sendingtext is the name of the doc) it did not work, just a 404 error message pops up.

origionaly, there was a index.html doc in the htdocs folder when I installed it, and I was able to call up by typing http://localhost/index.html on windows explorer, so I changed everything on my ‘sendingtext.php’ just the same as index.html. all the codes inside the doc, and even the php to html, but it still gives me a 404 error message when I try to open it. What am I doing wrong here?

When I opened the document (sendingtext.html) just manually by double clicking on it, it worked just fine.
SNW
 
Posts: 3
Joined: 17. February 2011 07:31

Re: calling up web content problems

Postby Altrea » 17. February 2011 16:30

Are you really sure, that the index.html file you can request is that one from your XAMPP and not from another Webserver?
You can simply test this by changing the text inside the index.html file.

If it is the correct file, take a look inside your \xampp\apache\logs\error.log file. In that file you will find the full error text for the 404 error (e.g. which file is requested and where it could not be found)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: calling up web content problems

Postby Sharley » 17. February 2011 23:39

Make sure your text editor is not adding .txt to the end of your file name, for example:
sendingtext.php.txt or sendingtext.html.txt

If so then configure your text editor not to do this kind of behavior.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: calling up web content problems

Postby SNW » 18. February 2011 10:20

Thanks for the reply guys

Altrea was right, I could not find any 404 messages in my error log in my apache xampp log, I changed the text in the C:\xampp\apache\htdocs\index.html to ‘It works! and this is an experiment’ from ‘It works!’ and the text did not change when i loaded up my window explorer and typed http://localhost/index.html i was fooled because when i opened the index.html in crimson editor, the text was ‘It works!’ so i did not think twice that it was a different doc.

So now, how do i know where this doc that is fooling me is? And how to i make it so that when i type in http://localhost/ it will pull up documents from C:\xampp\apache\htdocs\?


Thanks again for your help guys
SNW
 
Posts: 3
Joined: 17. February 2011 07:31


Return to Apache

Who is online

Users browsing this forum: No registered users and 263 guests