July 12th, 1999, 09:41 AM
I have a strange problem, my php3 scripts are not working id saved under HTMLs.
Detail: If I save the PHP3 scripts as HTML it does not work. If I save PHP3 then only it works.
I think I am missing some configuration setup. Can some one help. I am nebie to PHP3.
I have RedHat Linux 5.2 (2.0.32), with PHP3.0.9
July 12th, 1999, 02:08 PM
You're going to have to tell Apache to send .html files through the PHP parser (it doesn't by default).
If you have a high traffic website, I'd recommend against doing that. You don't want every page running thru the PHP parser even if it contains no PHP.
But if you want to, you just need to add a line to Apache's httpd.conf like:
AddType application/x-httpd-php3 .html
You'll probably find a line just like the one above that already has '.php3' at the end.
July 15th, 1999, 08:23 AM
I would think incorporating the HTML and the php scripts in the same file would work just fine using,
AddType application/x-httpd-php3 .phtml
as a line in httpd.conf and making sure that the <? //phpcode ?> are in their respective places, singeling out php and html.
Maby I missunderstood the question but I use this method with great success on multiple sites on our webservers.
July 15th, 1999, 11:23 AM
Thank you jpenix and gash,
It fixed my problem, now Iam a happy PHPLIB er.