php as plain text?

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

php as plain text?

Postby gwiz665 » 20. January 2009 07:50

I'm having a weird error which is bugging me like crazy. I think it's much like viewtopic.php?f=16&t=32740 but the solution there didn't really help me.

All the php code is not interpreted, but just spat out as plan text. When I look at the page source it's like so:

Code: Select all
<?
include ("./top.php");
$side = $_REQUEST['side'] * 10;
if ($side != NULL)
{
    $side = $side - 10;
}
forbind();
$samlet = mysql_query("SELECT * FROM `samlet` ORDER BY `dato` DESC LIMIT " . $side . ",10");

And so on.

If I change the <? to <?php it works, but shouldn't it work anyway? Is this some setting in apache or something?

It happened when I made a clean installation om XAMPP 1.7. Both apache and mysql is running.

even on http://localhost/xampp/ the title is "XAMPP <?include('.version');?>". How can I fix this? I've tried re-installing xampp multiple times.
gwiz665
 
Posts: 3
Joined: 20. January 2009 07:42

Re: php as plain text?

Postby gwiz665 » 20. January 2009 07:51

And I'm of course looking at it through the localhost/[proper subdomain]/.
gwiz665
 
Posts: 3
Joined: 20. January 2009 07:42

Re: php as plain text?

Postby Wiedmann » 20. January 2009 08:00

If I change the <? to <?php it works, but shouldn't it work anyway?

Read about "short tags":
http://de.php.net/manual/en/language.ba ... hpmode.php
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: php as plain text?

Postby gwiz665 » 20. January 2009 08:22

Thank you! :)
gwiz665
 
Posts: 3
Joined: 20. January 2009 07:42


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 129 guests