Page 1 of 1

I have intalled Xampp but I cant see .php files

PostPosted: 13. August 2009 22:54
by shaddow
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.

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

PostPosted: 13. August 2009 23:32
by Wiedmann
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

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

PostPosted: 14. August 2009 06:08
by shaddow
:oops:
Thanks.

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

PostPosted: 14. August 2009 17:46
by KaymeePhoto
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

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

PostPosted: 14. August 2009 19:03
by Wiedmann
It just echo's out the PHP text like it's a text file.

Maybe:
- wrong file extension
- short open tags

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

PostPosted: 14. August 2009 19:17
by KaymeePhoto
File extension is .php. Open tag is just <? Could it really need <?php ??

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

PostPosted: 14. August 2009 19:28
by Wiedmann
Could it really need <?php ?

Correct.

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

PostPosted: 14. August 2009 19:42
by KaymeePhoto
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.

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

PostPosted: 14. August 2009 21:27
by Nobbie
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".