php not executed

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

php not executed

Postby patrick76 » 06. May 2013 23:51

I'm having the same problem, KeepSmiling. I installed xampp today. I started Apache and MySQL from the xampp control panel. phpMyAdmin comes up just fine. However I can't get even a simple Hello World php file to work. The web browser shows a blank screen.

Here is the complete text as viewed in Chrome page source:

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
   echo "Hello World";
   ?>
   
</body>
</html>


[edit by Altrea: splitted from the original thread. One thread per unique user and issue rule]
patrick76
 
Posts: 2
Joined: 06. May 2013 23:41
Operating System: Windows 8

Re: php not executed

Postby Altrea » 07. May 2013 00:00

Hi patrick76,

The most common "php don't get parsed issues":
  • Using short_open_tag
  • wrong Browser request (file:// instead of http:// protocol)
  • File extension .html instead of .php
  • wrong encoding (UTF8 with instead of without ByteOrderMark, UCS2 or other Multibyte- or other non-ANSI character encodings)

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: php not executed

Postby patrick76 » 07. May 2013 00:25

It was the 2nd one. At least that gets Hello World working now, so I'm in business. Thanks, Altrea!
patrick76
 
Posts: 2
Joined: 06. May 2013 23:41
Operating System: Windows 8

Re: php not executed

Postby Altrea » 07. May 2013 00:39

You are welcome :D
Have fun with XAMPP and all that stuff 8)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests