Hi Sean,
What webserver are you using?  Is it using the Apache module of PHP or the
CGI version?

Perhaps the extension of your file doesn't have the PHP processor associated
with it (if it is installed as an Apache process)?

Maybe you are using the CGI version incorrectly?

With the command line version, you still need the <?php ?> tags before it
will process the PHP code.

e.g.
#!/usr/bin/php

<?php
echo "Hey, I am working fine.";
?>

That should work as you expect.

Cheers,
Kelly.

> I am trying to run a simple php4 script on my SuSE Linux 7.2 (Update)
> system, but I am not getting the correct output.  Instead of the browser
> (Netscape or Konqueror) showing a normal web page, it shows the raw
> commands from the php script portion of the html file.
>
> Here is the script I am using:
>
> <html>
>         <head>
>         <title>PHP Test Example</title>
>         </head>
>         <body>
>         <?php
>
>                 echo <hr>;
>                 echo date("H:i, jS F");
>                 echo <p>;
>                 echo Hi, I am a PHP script!<p>;
>                 echo <hr>;
>
>         ?>
>         </body>
> </html>
>
> When I open this file with konqueror or Netscape, the browser window
> carries the title "PHP Test Example", but the output within the browser
> window looks like this:
>
> ; echo date("H:i, jS F"); echo
>
> ; echo Hi, I am a PHP script!
>
> ; echo
> -------------------------<a horizontal rule>___________________
> ; ?>
>
> Furthermore, if I run a simple script from the command line, something
like
> this ("trythis.php"):
>
> #!/usr/bin/php
>
> echo "Hey, I am working fine.";
>
> this is the output I get:
>
> tschulze:~/web_dev/schulze> ./trythis.php
> X-Powered-By: PHP/4.0.4pl1
> Content-type: text/html
>
>
> echo "Hey, I am working fine.";
>
> tschulze:~/web_dev/schulze>
>
> Any idea what I need to do to get this working right?
>
> TIA,
> Sean
>
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to