Reply LinkBack Thread Tools Search this Thread
Old 01-03-2010, 12:02   #1 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
Error 403 - Forbidden

Error 403 - Forbidden

You tried to access a document for which you don't have privileges.

Getting this error on my site when attempting to submit a contact form

Form

Code:
<form method="post" action="sendmail.php" class="standardForm"> <div class="field"> <label for="name">Name</label> <input type="text" name="name" id="name" class="textbox" /> </div> <div class="field"> <label for="email">Email</label> <input type="text" name="email" id="email" class="textbox" /> </div> <div class="field"> <label for="phone">Phone</label> <input type="text" name="phone" id="phone" class="textbox" /> </div> <div class="field"> <label for="message">Message</label> <textarea name="message" id="message" class="textarea"></textarea> </div> <div class="field"> <input type="submit" name="submit" id="submit" value="Send Message" class="button" /> </div> </form>

sendmail.php
Code:
<?php $email = $_REQUEST['email'] ; $name = $_REQUEST['name'] ; $phone = $_REQUEST['phone'] ; $message = $_REQUEST['message'] ; mail( "me@gmail.com", "Site Contact Form", $name, $phone, $message, "From: $email" ); header( "Location: http://www.me.co.uk/thankyou.html" ); ?>

The sendmail.php has 644 privileges set, so not sure where to go from here.
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:03   #2 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
ok so what happens if you enter you url to the script in the browser? Also, has this happened with any other php scripts?
  Reply With Quote
Old 01-03-2010, 12:09   #3 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
You mean by entering me.co.uk/sendmail/php in the browser? Same error. Does that isolate the issue?
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:12   #4 (permalink)
jamblo
cuttin' and stickin'
 
jamblo's Avatar
 
Join Date: Jan 2008
Location: Devon
Posts: 941
have a look at mod_security.

You might need to add

Code:
SecFilterScanPOST Off

to your .htaccess file.

How to disable mod_security in .htaccess file
__________________
  Reply With Quote
Old 01-03-2010, 12:26   #5 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
Quote:
Originally Posted by scrooble
You mean by entering me.co.uk/sendmail/php in the browser? Same error. Does that isolate the issue?

do you want help or not?
  Reply With Quote
Old 01-03-2010, 12:27   #6 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
Quote:
Originally Posted by Pete Nice
do you want help or not?

Yes I fucking do Peter, that wasn't a sarccy reply you idiot.
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:28   #7 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
haha fuck you Scrooble.
  Reply With Quote
Old 01-03-2010, 12:31   #8 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
Fuck you too Peter, now give me some help and I'll touch you where you wee from
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:32   #9 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
You may need your isp to change your php.ini file. Chuck up a phpinfo.php file and see if you get an ouptut:

PHP Code:
<?php
phpinfo
();
?>
  Reply With Quote
Old 01-03-2010, 12:42   #10 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
Same error on that Pete.

And I can't change my .htaccess file, dont have permissions. Going to get onto 1and1, would that be related to above issue?
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:43   #11 (permalink)
iandevlin
éireannach
 
iandevlin's Avatar
 
Join Date: Sep 2009
Location: Cambridge, UK
Posts: 490
Does the host actually support PHP?
__________________
  Reply With Quote
Old 01-03-2010, 12:45   #12 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
According to this it does. However, I don't remember the package supporting it originally, would I have to request to have mine enabled?
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:45   #13 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
ahhh - now he says it's 1and1 - I'm sure there is something you have to change in the control panel - I had this problem with someone's site.
  Reply With Quote
Old 01-03-2010, 12:46   #14 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
Oh no....
__________________
£108
  Reply With Quote
Old 01-03-2010, 12:51   #15 (permalink)
iandevlin
éireannach
 
iandevlin's Avatar
 
Join Date: Sep 2009
Location: Cambridge, UK
Posts: 490
It would explain your woes!
__________________
  Reply With Quote
Old 01-03-2010, 12:55   #16 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
Just out of purely laziness I've not moved. If any of you resellers out there want to bag me and make a quick buck im happy for that. Limbo?

So 1and1 is a bad mmm-kk?
__________________
£108
  Reply With Quote
Old 01-03-2010, 13:01   #17 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
what's the permission of your public_html folder?
  Reply With Quote
Old 01-03-2010, 13:05   #18 (permalink)
scrooble
Llama Charmer
 
scrooble's Avatar
 
Join Date: Oct 2008
Posts: 3,091
755
__________________
£108
  Reply With Quote
Old 01-03-2010, 13:06   #19 (permalink)
Pete Nice
Crankshaft
 
Pete Nice's Avatar
 
Join Date: Apr 2003
Posts: 2,108
scroobs - try putting the script in a subfolder and make sure the folder has 775 permissions - I'm reading something that says that as the file is in the root and it's not named index.php or similar it won't work.
  Reply With Quote
Old 01-03-2010, 13:41   #20 (permalink)
Aibrean
Brutally Honest
 
Aibrean's Avatar
 
Join Date: Jan 2004
Location: Dayton, OH
Posts: 1,052
Send a message via AIM to Aibrean Send a message via MSN to Aibrean
http://www.me.co.uk/thankyou.html

Would help if we saw what the real URL is.

I know Jack's Formmail works on 1and1. You could try that.

Make sure the PHP is correct (all the paths in the file).
__________________

  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet