XAMPP and PHP on Windows 7

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

XAMPP and PHP on Windows 7

Postby Lennart » 03. January 2010 03:24

I have successfully installed XAMPP 1.7.3 on Windows 7 Ultimate edition. I am running as an administrative user an I have installed XAMPP in c:\xampp.

XAMPP comes up fine and the PHP samples run fine. I can also write small PHP test programs that work.

Howewer, when I try to run a larger program that I have run on Windows XP SP2 for the last two years i get a parsing error:

Code: Select all
<p>
<form method="post" action="<?php echo $PHP_SELF;?>">
<?
$b= new Busa();
$b->displayTypes("USA");
?>
     
<p><input type="submit" name="SubmitForm" value="Sortera">
</form>


The code snippet above results in the following parsing error:
displayTypes("USA"); ?>

and then the rest of the php code is displayed without being interpreted, just like when you run a PHP file in an HTML page without php enabled. I.e. the PHP parser does not understand $b->displayTypes("USA"); and the rest of the page

Now, as I said, this runs fine without any problem on a number of Windows XP servers I have. I have made NO CHANGES to my own code, just copied it over. First file by file then by zipping it up and unzipping it on Windows 7.

AND, to make things even more mysterious, since I thought there might be a problem with XAMPP, I installed one of your competitors and I get EXCACTLY the same error.

So this has something to do with Windows 7 but I can't for the life of me figure out what it is. And I can add that Windows 7 Ultimate was installed by an expert, so it works fine.

Since I am sure I am not the only one who will encounter this problem I wonder if anyone else has seen this and can help me figure out what is causing it.

It is really odd.
Lennart
 
Posts: 2
Joined: 03. January 2010 02:59

Re: XAMPP and PHP on Windows 7

Postby Wiedmann » 03. January 2010 03:30

Code: Select all
<form method="post" action="<?php echo $PHP_SELF;?>">

Code: Select all
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">


Code: Select all
<?

Code: Select all
<?php
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: XAMPP and PHP on Windows 7

Postby Lennart » 03. January 2010 19:09

Whao, that was it, MANY THANX for your response! The odd thing is that the code I had before the changes works fine on an earlier version of XAMPP on Windows XP. Thanx again!
Lennart
 
Posts: 2
Joined: 03. January 2010 02:59


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests