.php file open problem

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

.php file open problem

Postby louismoore18 » 14. June 2011 10:33

Hey
Im basically trying to open a .php file. When i choose the 'internet explorer' from 'open with..' i get a error message. or if i go through my internet e.d "\'file location'\'filename'.php" it tells me to 'open' or 'save'. I google it a bit and some people said open with your webroot folder.. is this the reason?
Only problem is i havent got a clue where mine is?
Im using 'XAMPP' which comes with apache,myphphadmin and mysql incase you didnt know.

Can anyone help?
louismoore18
 
Posts: 5
Joined: 14. June 2011 10:29

Re: .php file open problem

Postby Sharley » 14. June 2011 10:39

First start the Apache and MySQL servers using the XAMPP Control Panel - double click on C:\xampp\xampp-control.exe.

The file must be parsed by a web server so type http://localhost/filename.php in your browser and you should see the result - the filename.php must be in the C:\xampp\htdocs folder (the web root or Apache server DocumentRoot) or in a folder in the htdocs folder, for example C:\xampp\htdocs\myfolder then you would type http://localhost/myfolder/filename.php in your address bar.

Read the C:\xampp\readme_en.txt file and the XAMPP for Windows Home Page where you downloaded XAMPP from perhaps.

If you just want to read or edit the php code itself then simply drag it into an open page in your text editor.

Let me know if I did not explain it well enough. :)
Last edited by Sharley on 14. June 2011 10:47, edited 1 time in total.
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: .php file open problem

Postby louismoore18 » 14. June 2011 10:47

Thanks,
I have placed .php files within "c:\xampp\htdocs\file.php" i cant seem to be able to find them in my web browser. I put in web browser "http://localhost/xampp/htdocs/" and it returns the message...
"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
14/06/2011 10:41:54 AM
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1"
louismoore18
 
Posts: 5
Joined: 14. June 2011 10:29

Re: .php file open problem

Postby Sharley » 14. June 2011 10:50

You can see a better error message in C:\xampp\apache\logs\error.log file by dragging it into an open text editor page.

BTW the address does not include xampp - http://localhost/file.php will see you moving forward.
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: .php file open problem

Postby louismoore18 » 14. June 2011 10:54

i found the problem.. i just had to put in web address "http://localhost/filename.php" instead i was searching the file address
All sorted now!

cheers
louismoore18
 
Posts: 5
Joined: 14. June 2011 10:29


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 49 guests