View Full Version : How to parse php??
fryman
Jan 9th 2005, 1:44 pm
I am going crazy, I have tried every combination I have found on the net, and every time I do a change to my htaccess file my site goes down. I just can't find a way to parse the damn php in html. Any help? For example, take a look at www.templategarage.net/test.htm, it shows that is not parsing, just get a blank page.
HELP!!!!!
mushroom
Jan 9th 2005, 2:17 pm
I am going crazy, I have tried every combination I have found on the net, and every time I do a change to my htaccess file my site goes down. I just can't find a way to parse the damn php in html. Any help? For example, take a look at www.templategarage.net/test.htm, it shows that is not parsing, just get a blank page.
HELP!!!!!
If your web server is php enabled the web page must have a php extention for the php module to be called, change it to "test.php"
minstrel
Jan 9th 2005, 2:34 pm
That's not what he's trying to do:
<html>
<head></head>
<body>
<h1>
<?php echo "I LOVE PHP!"; ?>
</h1>
</body>
</html>
First question, though, is indeed: does your hosting service support PHP?
fryman
Jan 9th 2005, 2:43 pm
Geez... I was trying to avoid having live links on my post, why do you need to quote me?
www.templategarage.net/test.php
Yup, it supports php
Christopher
Jan 9th 2005, 2:44 pm
Second question, does your host allow you to alter the .htaccess file.
If your host does support php, and you can edit your .htaccess file, we should be able to get your php parsing on .html files.
If you do change that to 'test.php' (as a test), does it work? That would indicate that you do have php.
Christopher
Jan 9th 2005, 2:46 pm
Opps, see you answered the php question as I was asking it :)
fryman
Jan 9th 2005, 2:50 pm
I don't know if my host "allows" it, although I've never heard of one that doesn't.
Every time I upload a new htaccess file my site goes down.
I see in my cpanel that there is an icon that says "Apache Handlers". If I click on it, I get to what is attached on my image. Any idea if parsing can be done by inserting something here?
Christopher
Jan 9th 2005, 2:54 pm
I have some basic .htaccess instructions for this at:
http://www.onyoursite.com/dothtml.html
maybe will help?
chachi
Jan 9th 2005, 2:55 pm
looks like the place to do it.
Put .html or whatever your file extensions are in the left box and application/x-httpd-php in the right one
fryman
Jan 9th 2005, 3:03 pm
YES!!!!! Thank you so much, chachi!!!!!! It works!!
Christopher
Jan 9th 2005, 3:14 pm
Congrats fryman, glad 'cha got it :)
fryman
Jan 9th 2005, 3:21 pm
Yeah... but it seems like a waste of time, since I was trying to get some coop ads up, but they just won't show.
Oh, well... this site is going to Ebay tonight anyway... what the heck ;)
celt
Jan 13th 2005, 5:57 am
It shouldn't be a waste of time. Adding an Apach handler in cPanel was exactly how I got my coop ads showing on my website.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.