XAMPP: PHP

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

XAMPP: PHP

Postby Logic » 31. May 2008 14:53

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/.
Logic
 
Posts: 6
Joined: 31. May 2008 14:47

Postby Xardas der Dunkle » 31. May 2008 15:28

You have to save the file as .php
User avatar
Xardas der Dunkle
 
Posts: 482
Joined: 09. March 2008 19:40
Location: /var/www

Postby Logic » 31. May 2008 16:25

I know that.
It is info.php - however, not much success...
Logic
 
Posts: 6
Joined: 31. May 2008 14:47

Postby Dave_L » 31. May 2008 16:30

Where did you put the file (full path), and how are you testing it?
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Wiedmann » 31. May 2008 17:11

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.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Logic » 31. May 2008 18:58

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... :|
Logic
 
Posts: 6
Joined: 31. May 2008 14:47

Postby Wiedmann » 31. May 2008 19:31

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.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Logic » 31. May 2008 19:54

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.
Logic
 
Posts: 6
Joined: 31. May 2008 14:47


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests