Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-27-2010, 10:40 PM   PM User | #1
mssteph
New Coder

 
Join Date: Jul 2008
Location: MD, USA
Posts: 65
Thanks: 16
Thanked 0 Times in 0 Posts
mssteph is an unknown quantity at this point
Getting 4 parts (.shtml, PHP, .ssi, reCAPTCHA) to work on a page using .htaccess

I'm new at PHP so please bear with me as I have very little idea what I'm talking about.

I have a page, saved with an .shtml extension, that contains PHP (for a contact form), as well as a reCAPTCHA script to prevent spam. The page also features an include (.ssi) in the footer. So, 4 parts to the page:

1. .shtml
2. PHP contact form
3. reCAPTCHA
4. .ssi include

(Additional and perhaps totally unnecessary info is that every page on the site has an .shtml extension, there are multiple contact forms (4-5), and since the .ssi include is the footer, it is used sitewide as well.)

I've altered the .htaccess a bit, with this:

Code:
Options +Includes
AddType text/html .shtml .shtm .htm .html
AddHandler server-parsed .shtml
AddHandler application/x-httpd-php .shtml .shtm .htm .html
AddHandler php5-cgi .php
(I'm about as new to modifying .htaccess as I am to PHP, so, again, no idea what I'm talking about.)

(If it helps any, I'm using Dreamhost.)

Everything is OK except for this, this is what I'm having a problem with: either the reCAPTCHA shows and the .ssi/footer doesn't, or the .ssi/footer shows and the reCAPTCHA doesn't. They don't work at the same time.

I've played around with the .htaccess all day, to no avail. I've researched. I can't find anything to help, or steer me in the right direction.

As it stands right now, the code above (the .htaccess) makes the .ssi/footer show and the reCAPTCHA not.

If I change it to this:

Code:
AddType text/html .shtml .shtm .htm .html .php
AddHandler php5-cgi .shtml .shtm .htm .html .ssi
...then the reCAPTCHA shows, and the .ssi/footer doesn't.

Any help would be great!!!!

Last edited by mssteph; 04-27-2010 at 10:41 PM.. Reason: Spelling
mssteph is offline   Reply With Quote
Reply

Bookmarks

Tags
htaccess, php, recaptcha, shtml, ssi

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:39 PM.


Advertisement
Log in to turn off these ads.