Page 1 of 1

Cannot load php page into localhost

PostPosted: 27. January 2012 02:02
by Cindy W
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!

Re: Cannot load php page into localhost

PostPosted: 27. January 2012 02:10
by Sharley
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

Re: Cannot load php page into localhost

PostPosted: 02. February 2012 03:49
by Cindy W
I changed my files to the htdocs folder, but same result.

Re: Cannot load php page into localhost

PostPosted: 02. February 2012 03:54
by Sharley
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.

Re: Cannot load php page into localhost

PostPosted: 05. February 2012 06:22
by ainizahirah
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.

Re: Cannot load php page into localhost

PostPosted: 05. February 2012 21:06
by Leonel
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 "

Re: Cannot load php page into localhost

PostPosted: 05. February 2012 22:20
by Leonel
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

Re: Cannot load php page into localhost

PostPosted: 08. February 2012 23:29
by Grafica
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.

Re: Cannot load php page into localhost

PostPosted: 09. February 2012 02:28
by ainizahirah
i've tried to create test.php file in htdocs, but the problem is still remain.. :(

Re: Cannot load php page into localhost

PostPosted: 09. February 2012 02:47
by ainizahirah
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. :)

Re: Cannot load php page into localhost

PostPosted: 09. February 2012 16:42
by Grafica
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.

Re: Cannot load php page into localhost

PostPosted: 09. February 2012 21:16
by Grafica
I changed the information to what I had previously in the hosts file and the config. file, and I'm back in business!

Re: Cannot load php page into localhost

PostPosted: 15. February 2012 17:53
by brightspark
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.

Re: Cannot load php page into localhost

PostPosted: 16. February 2012 01:25
by JonB
Great - So we should mark this 'Solved'?

Thanks