PHP doesn't execute .php files but rather opens the source code file

Hello,

this is a newbee question, so my apologies if it is too bone-headed.

When double chicking .php files in the browser the php file does not execute but rather the source code
file in the browser is opened which I'm sure is not what is suppose to happen.

For example, if I type http://localhost/amfphp/services/HelloWorld.php the following simply gets displayed:

<?
class HelloWorld
{
function HelloWorld()
{
$this->methodTable = array
(
"say" => array
(
"access" => "remote",
"description" => "Pings back a message"
)
);
}

function say($sMessage)
{
return 'You said: ' . $sMessage;
}
}
?>

Scott Hamilton
scottrhamilton [at] web.de




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ScottRHamilton [ So, 22 November 2009 10:05 ] [ ID #2023680 ]

RE: PHP doesn't execute .php files but rather opens thesource code file

Hi Scott,

Can you ensure that the PHP INI directive 'short_open_tag'is set to 'On'. D=
etails about this can be found at http://php.net/manual/en/ini.core.php. I =
would advise to use

<?php
//Php code
?>

This will ensure that there is no confusion among different languages using=
a similar notation like XML.

Thanks,
Don.

-----Original Message-----
From: ScottRHamilton [at] web.de [mailto:ScottRHamilton [at] web.de]
Sent: Sunday, November 22, 2009 1:05 AM
To: php-windows [at] lists.php.net
Subject: [PHP-WIN] PHP doesn't execute .php files but rather opens the sour=
ce code file

Hello,

this is a newbee question, so my apologies if it is too bone-headed.

When double chicking .php files in the browser the php file does not execu=
te but rather the source code
file in the browser is opened which I'm sure is not what is suppose to happ=
en.

For example, if I type http://localhost/amfphp/services/HelloWorld.php the =
following simply gets displayed:

<?
class HelloWorld
{
function HelloWorld()
{
$this->methodTable =3D array
(
"say" =3D> array
(
"access" =3D> "remote",
"description" =3D> "Pings back a message"
)
);
}

function say($sMessage)
{
return 'You said: ' . $sMessage;
}
}
?>

Scott Hamilton
scottrhamilton [at] web.de




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Venkat Raman Don [ So, 22 November 2009 19:14 ] [ ID #2023684 ]
PHP » gmane.comp.php.windows » PHP doesn't execute .php files but rather opens the source code file

Vorheriges Thema: PHP info can't find MySql with IIS web server
Nächstes Thema: Cambios de la cuenta de correos