From: e-letter on
Readers,

Copy below of message sent 15 August to php install digest list, but
to date not including in mail archive?

The tutorial example:

<html>
<head>
<title>php test
</title
</head>
<body>
<?php
echo '<p>Hi, I am a PHP script</p>';
?>
<p>
this is a test
</p>
</body>
</html>

is saved to the normal user temporary folder as 'test.php' and then
copied to the folder '/var/www/html/' using the root user account. The
web browser is directed to url 'http://localhost.test.php, to show:

Hi, I am a PHP script

'; ?>

this is a test

What is the error please?

Urpmi was used to install so the php version installed is not known.
How to obtain this please
From: "Arno Kuhl" on
-----Original Message-----
From: e-letter [mailto:inpost(a)gmail.com]
Sent: 18 August 2010 10:44 AM
To: php-general(a)lists.php.net
Subject: [PHP] tutorial failure

Readers,

Copy below of message sent 15 August to php install digest list, but to date
not including in mail archive?

The tutorial example:

<html>
<head>
<title>php test
</title
</head>
<body>
<?php
echo '<p>Hi, I am a PHP script</p>';
?>
<p>
this is a test
</p>
</body>
</html>

is saved to the normal user temporary folder as 'test.php' and then copied
to the folder '/var/www/html/' using the root user account. The web browser
is directed to url 'http://localhost.test.php, to show:

Hi, I am a PHP script

'; ?>

this is a test

What is the error please?

Urpmi was used to install so the php version installed is not known.
How to obtain this please

--

Shouldn't that be http://localhost/test.php

Cheers
Arno


From: Peter Lind on
On 18 August 2010 10:44, e-letter <inpost(a)gmail.com> wrote:
> Readers,
>
> Copy below of message sent 15 August to php install digest list, but
> to date not including in mail archive?
>
> The tutorial example:
>
> <html>
>      <head>
>              <title>php test
>              </title
>      </head>
>      <body>
>              <?php
>                      echo '<p>Hi, I am a PHP script</p>';
>              ?>
>              <p>
>              this is a test
>              </p>
>      </body>
> </html>
>
> is saved to the normal user temporary folder as 'test.php' and then
> copied to the folder '/var/www/html/' using the root user account. The
> web browser is directed to url 'http://localhost.test.php, to show:
>
> Hi, I am a PHP script
>
> '; ?>
>
> this is a test
>
> What is the error please?

Looks like a problem with quotes, I'd say.

> Urpmi was used to install so the php version installed is not known.
> How to obtain this please

Check with php -i from the command line or a script containing
phpinfo(); requested through the browser.

Regards
Peter

--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>
From: e-letter on
I changed the code as follows:

<html>
<head>
<title>php test
</title>
</head>
<body>
<?php phpinfo ?>
<?php
echo "<p>Hi, I am a PHP script</p>";
?>
<p>
this is a test
</p>
</body>
</html>

The result (http://localhost/test.php):

Hi, I am a PHP script

"; ?>

this is a test

If I use single quotes characters:

Hi, I am a PHP script

'; ?>

this is a test

The phpinfo instruction does not seem to be recognised. What else
should I check?
From: chris h on
php is not processing the file. There's a few reasons for this, but the
first thing I would check is the permissions of the file. From the
directory try

$ ls -oa

This should tell you who owns the file and what it's permissions are. You
mentioned that you copied it as root, you could change it's ownership to
www-data.

again from the directory try.

$ chown www-data test.php

then run ls -oa to ensure the change took place.


Chris.

On Wed, Aug 18, 2010 at 6:03 AM, e-letter <inpost(a)gmail.com> wrote:

> I changed the code as follows:
>
> <html>
> <head>
> <title>php test
> </title>
> </head>
> <body>
> <?php phpinfo ?>
> <?php
> echo "<p>Hi, I am a PHP script</p>";
> ?>
> <p>
> this is a test
> </p>
> </body>
> </html>
>
> The result (http://localhost/test.php):
>
> Hi, I am a PHP script
>
> "; ?>
>
> this is a test
>
> If I use single quotes characters:
>
> Hi, I am a PHP script
>
> '; ?>
>
> this is a test
>
> The phpinfo instruction does not seem to be recognised. What else
> should I check?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>