rename your file phptest.php or .php3 or .php4 depending on how apache is setup. Apache looks at the file extension to discover what sort of file it is and what processing needs to be applied to a file. ie unless you tell apache that a .php file goes to the php processor it will just try and display it. You need to check /etc/httpd/httpd.conf to see what files are associated with what by apache. dids
My expectation was that konqueror, apache and php4 would work "right out of the box" after I updated my SuSE Linux 7.1 system to 7.2, but so far I have not had any luck running even a simple php script. Are there any specific "tweaks" that need to be done in order to get this setup working?
Here is the script I am working with ("phptest.html"):
<html> <head> <title>PHP Test Example</title> </head> <body>
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 output I get looks like this:
The window/document shows the title bar "PHP Test Example"
Within the browser window it shows:
; echo date("H:i, jS F"); echo
; echo Hi, I am a PHP script!
; echo -------------------------<a horizontal rule>___________________ ; ?>
Any ideas on what I am doing wrong or what I need to do to fix this?
TIA, Sean