I have intalled Xampp but I cant see .php files

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

I have intalled Xampp but I cant see .php files

Postby shaddow » 13. August 2009 22:54

Hi,I am new with PHP and Xampp,
and this is first time I use Xampp.

When I go to http://localhost/index.html I see white page which says "It works!"

but when I tried to go http://localhost/index.php,it takes me to http://localhost/xampp
even if I make other subfolders to "htdocs"

Did I "installed" it right? Or what should I do? And which modules should be running?
I have Apache and MySql.

I am using Windows Vista and version of Xamp is 1.7.2

If you need something else to know,ask and I reply as soon as possible.

Thanks already.
shaddow
 
Posts: 2
Joined: 13. August 2009 22:35

Re: I have intalled Xampp but I cant see .php files

Postby Wiedmann » 13. August 2009 23:32

but when I tried to go http://localhost/index.php,it takes me to http://localhost/xampp
even if I make other subfolders to "htdocs"

If you open the file "/index.php" in htdocs, it opens exactly this file (well, in this file there is a redirect to "/xampp/").

If you want open something in a subfolder, you must instruct your browser to do so:
http://localhost/subfolder/filename.ext
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: I have intalled Xampp but I cant see .php files

Postby shaddow » 14. August 2009 06:08

:oops:
Thanks.
shaddow
 
Posts: 2
Joined: 13. August 2009 22:35

Re: I have intalled Xampp but I cant see .php files

Postby KaymeePhoto » 14. August 2009 17:46

I have a seemingly related problem. I've installed XAMPP and got to the "IT WORKS" page. Opening up .php files inside the standard localhost directory works fine too (http://localhost/biorythm.php, etc.).

I copied another directory with a PHP program in it to the localhost directory (/xampp/htdocs/...)

When I open that PHP program in the browser with the proper path (http://localhost/{MY DIR}/) the PHP doesn't work at all. It just echo's out the PHP text like it's a text file. It does display the HTML code just fine, but doesn't run the PHP code. I do have Apache started.

Also, the code works fine on the web. I just want a local development platform so I don't have to continuously upload the files to the server.

Thoughts on this? Thanks,

Chad
KaymeePhoto
 
Posts: 3
Joined: 14. August 2009 17:40

Re: I have intalled Xampp but I cant see .php files

Postby Wiedmann » 14. August 2009 19:03

It just echo's out the PHP text like it's a text file.

Maybe:
- wrong file extension
- short open tags
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: I have intalled Xampp but I cant see .php files

Postby KaymeePhoto » 14. August 2009 19:17

File extension is .php. Open tag is just <? Could it really need <?php ??
KaymeePhoto
 
Posts: 3
Joined: 14. August 2009 17:40

Re: I have intalled Xampp but I cant see .php files

Postby Wiedmann » 14. August 2009 19:28

Could it really need <?php ?

Correct.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: I have intalled Xampp but I cant see .php files

Postby KaymeePhoto » 14. August 2009 19:42

Alright. I'll try that. Weird that's it doesn't seem to be a standard though. It works on many sites on several different servers without the php. I'll have to remember to type it.

Thanks.
KaymeePhoto
 
Posts: 3
Joined: 14. August 2009 17:40

Re: I have intalled Xampp but I cant see .php files

Postby Nobbie » 14. August 2009 21:27

KaymeePhoto wrote:Alright. I'll try that. Weird that's it doesn't seem to be a standard though. It works on many sites on several different servers without the php. I'll have to remember to type it.

Thanks.


Its simply a runtime option in the configuration file php.ini, the option is called "short_tags".
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 26 guests