Page 1 of 1

XAMPP: PHP

PostPosted: 31. May 2008 14:53
by Logic
I have problems with XAMPP regarding PHP, I believe.
I wish to learn server-side scripting and since the installation and configuration of PHP and Apache is.. a bit frustrating, I have chosen to use XAMPP. However, although the Apache is running fine and I see the XAMPP splash screen at 127.0.0.1, when I attempt to test a PHP script as simple as <?php phpinfo(); ?> all I see in the code itself and not the effect. The XAMPPStatus indicates that PHP is "active".
The "Path" environment variable points to the PHP folder- XAMPP/php/.

PostPosted: 31. May 2008 15:28
by Xardas der Dunkle
You have to save the file as .php

PostPosted: 31. May 2008 16:25
by Logic
I know that.
It is info.php - however, not much success...

PostPosted: 31. May 2008 16:30
by Dave_L
Where did you put the file (full path), and how are you testing it?

PostPosted: 31. May 2008 17:11
by Wiedmann
when I attempt to test a PHP script as simple as <?php phpinfo(); ?> all I see in the code itself and not the effect.

You can't double click a PHP file in explorer. You must open it with "http://.." in a webbrowser.

PostPosted: 31. May 2008 18:58
by Logic
I know all that. I have a great deal of experience with other web techs like CSS, XHTML, JavaScript and I even can do some programming in a few different languages as I am also perfectly familiar with how to create, run, test a simple .php file... in case all the required software functions properly.

That may sound selfish, but I do not exactly see myself as a lame newbie in the computer technologies territory so I do not believe the problem is as simple as as an extension or a matter of execution... But then again.. it seems I am.

Anyway, sorry.

The file is on the desktop: C:\Documents and Settings\..\Desktop\info.php and I do run it in a browser, just as an HTML file is run...

I then see the code, god, I do not try to open it by doubleclicking it... :|

PostPosted: 31. May 2008 19:31
by Wiedmann
The file is on the desktop: C:\Documents and Settings\..\Desktop\info.php and I do run it in a browser, just as an HTML file is run...

That's the same as a double click (or right click -> run with; or browser -> file open).

As you can read in the file "readme_en.txt", you must store the file in the "htdocs" directory and open it with e.g. "http://localhost/info.php" in a webbrowser.

other web techs like CSS, XHTML, JavaScript

That's all client side stuff. PHP is only working on the server.

PostPosted: 31. May 2008 19:54
by Logic
I know...
Guess that's why I know not quite much about PHP and all the stuff.

I've got it.. finally... So, http://localhost, actually, replaces C:\xammp.
Intriguing.

Thanks a lot. I thought the readme was full of irrelevant to my problem stuff... like they are most of the time. Sorry. I will learn to do better.