Cannot load php page into localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cannot load php page into localhost

Postby Cindy W » 27. January 2012 02:02

I put the URL into the address bar, but it tells me "Object Not Found" and Error 403 or 404. I have my files saved in the htdocs/xampp/~myfile....but no success.

Please help!
Cindy W
 
Posts: 2
Joined: 27. January 2012 01:55
Operating System: Windows 7

Re: Cannot load php page into localhost

Postby Sharley » 27. January 2012 02:10

I have my files saved in the htdocs/xampp/~myfile..
You do not save your own files in the htdocs\xampp folder.
Save them in the htdocs folder only.

Then when you have moved your files in to the htdocs folder, please tell me what you type in the browser's address bar to access them.

Good luck. :)


New users may find self help by reading these pages:

readme_en.txt file in the xampp folder.

http://www.apachefriends.org/en/xampp-windows.html
http://www.apachefriends.org/en/faq-xampp-windows.html

Some useful reading that may help you help us to find suitable solutions:
viewtopic.php?f=16&t=48331
viewtopic.php?f=16&t=32670
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: Cannot load php page into localhost

Postby Cindy W » 02. February 2012 03:49

I changed my files to the htdocs folder, but same result.
Cindy W
 
Posts: 2
Joined: 27. January 2012 01:55
Operating System: Windows 7

Re: Cannot load php page into localhost

Postby Sharley » 02. February 2012 03:54

Sharley wrote:Then when you have moved your files in to the htdocs folder, please tell me what you type in the browser's address bar to access them.
Perhaps you can now answer this question please.
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: Cannot load php page into localhost

Postby ainizahirah » 05. February 2012 06:22

i have the very same problem as well. my php file is located in xampp/htdocs folder. and the browser address is http://localhost/myfolder. tried uninstall and reinstall xampp and also restart the pc for few times but still cannot work. fyi, i'm using xampp ver 1.7 with windows 7 as the OS. please advice.
ainizahirah
 
Posts: 3
Joined: 05. February 2012 05:57
Operating System: Windows 7

Re: Cannot load php page into localhost

Postby Leonel » 05. February 2012 21:06

I am having the same problem ... I am using xampp v1.7.7 running Win7 64bit - I created at test.php file in c:\xampp\htdocs - in firefox browser I typed in localhost/test.php and I get the same error as Cindy "Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
02/05/12 12:05:14
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 "
Leonel
 
Posts: 2
Joined: 05. February 2012 20:57
Operating System: Win7 64bit

Re: Cannot load php page into localhost

Postby Leonel » 05. February 2012 22:20

I think I discovered the problem! You need to create the test.php file in notepad++ and save it as a php file. If you are using the regular "textdocument" app that you come to when right clicking in htdocs then that is being saved as a .txt file not a .php file.

Any way, using notepad++ worked for me
Leonel
 
Posts: 2
Joined: 05. February 2012 20:57
Operating System: Win7 64bit

Re: Cannot load php page into localhost

Postby Grafica » 08. February 2012 23:29

I have the same problem with the localhost page not loading, but saying "Object not found!" I have version 2.5 of the Control Panel and Apache and MySQL are running on Windows 7.
Grafica
 
Posts: 12
Joined: 08. February 2012 23:03
Operating System: Windows 7 SP1, 32 bit

Re: Cannot load php page into localhost

Postby ainizahirah » 09. February 2012 02:28

i've tried to create test.php file in htdocs, but the problem is still remain.. :(
ainizahirah
 
Posts: 3
Joined: 05. February 2012 05:57
Operating System: Windows 7

Re: Cannot load php page into localhost

Postby ainizahirah » 09. February 2012 02:47

i seems that i cannot use localhost in the browser... so, i guess, it is apart of the solution as well, i'm using the localhost default ip address. :)
ainizahirah
 
Posts: 3
Joined: 05. February 2012 05:57
Operating System: Windows 7

Re: Cannot load php page into localhost

Postby Grafica » 09. February 2012 16:42

I remembered that I changed the config. file to host multiple sites, which caused the localhost page not to load, so I need to figure out what I had before.
Grafica
 
Posts: 12
Joined: 08. February 2012 23:03
Operating System: Windows 7 SP1, 32 bit

Re: Cannot load php page into localhost

Postby Grafica » 09. February 2012 21:16

I changed the information to what I had previously in the hosts file and the config. file, and I'm back in business!
Grafica
 
Posts: 12
Joined: 08. February 2012 23:03
Operating System: Windows 7 SP1, 32 bit

Re: Cannot load php page into localhost

Postby brightspark » 15. February 2012 17:53

I am a newbie, just started developing a web site and wanted to use a registration page using php and mysql. I had the same problem. The following worked for me.

I uninstalled the full version of xampp (although I think this will work with the full version) and installed the lite version.
I used the exe self extracting file. In the lite version there is a read me file follow the basic install info, obviously, you will already have installed it to get the read me file. Whilst installing I got a message about the User Account Control function (UAC) (Windows Vista) suggesting this should be turned off as some elements of xampp may not work, I turned mine off.

I also found a document called Installing, Configuring, and Developing with XAMPP, which you can find at http://dalibor.dvorski.net/downloads/docs/InstallingConfiguringDevelopingWithXAMPP.pdf. this also walks you through the installation process. It's a 2007 document so refers to an earlier version of XAMPP, don't worry it works with the latest version. There are some basic test documents that you need to write, I used NotePad. There is also a mySQL database that you need to create.

One of the key things is copying the phpMyAdmin directory to the the htdocs directory. Which I am guessing is required as php and mySQL are server side operations. After some fiddling writing the php files it worked for me.
User avatar
brightspark
 
Posts: 1
Joined: 15. February 2012 17:24
Location: New Forest, Hampshire, UK
Operating System: Windows Vista

Re: Cannot load php page into localhost

Postby JonB » 16. February 2012 01:25

Great - So we should mark this 'Solved'?

Thanks
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 33 guests