php4 and apache on SuSE Linux
| From: | T . Sean Schulze | Date: | Thu, 13 Sep 2001 09:47:16 +0000 |
| Subject: | php4 and apache on SuSE Linux | ||
| Groups: | php.general php.install | ||
| Request: | Send a blank email to php-general+get-67172@lists.php.net to get a copy of this message | ||
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
hussar256@hotmail.com