dorfhima Posted July 25, 2016 Share Posted July 25, 2016 I am getting this error everytime i use my php form HTTP Error 405.0 - Method Not Allowed PHP CODE: <?php //if "email" variable is filled out, send email if (isset($_REQUEST['email'])) { //Email information $admin_email = "someone@example.com"; $email = $_REQUEST['email']; $subject = $_REQUEST['subject']; $comment = $_REQUEST['comment']; //send email mail($admin_email, "$subject", $comment, "From:" . $email); //Email response echo "Thank you for contacting us!"; } //if "email" variable is not filled out, display the form else { ?> <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/ Share on other sites More sharing options...
requinix Posted July 25, 2016 Share Posted July 25, 2016 Sounds like POSTing isn't enabled for your script. Talk to your hosting provider to see what's up with that. Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534987 Share on other sites More sharing options...
dorfhima Posted July 25, 2016 Author Share Posted July 25, 2016 How do I enable it? (my website isnt published) Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534990 Share on other sites More sharing options...
requinix Posted July 25, 2016 Share Posted July 25, 2016 Are you running this site on your own computer? With IIS? How did you set it up? Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534991 Share on other sites More sharing options...
dorfhima Posted July 25, 2016 Author Share Posted July 25, 2016 Yes, I run the site on my computer using IIS Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534992 Share on other sites More sharing options...
requinix Posted July 25, 2016 Share Posted July 25, 2016 How did you set it up? Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534993 Share on other sites More sharing options...
dorfhima Posted July 25, 2016 Author Share Posted July 25, 2016 What do you mean? Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534994 Share on other sites More sharing options...
requinix Posted July 25, 2016 Share Posted July 25, 2016 What did you do to make IIS support PHP, and what did you do to make IIS run the website you're running with PHP? Actually no, let's just skip to the chase: iis method not allowed Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534995 Share on other sites More sharing options...
Jacques1 Posted July 25, 2016 Share Posted July 25, 2016 (edited) Unless you're planning to run IIS on your production server as well, I suggest you get rid of it and install a more common webserver, namely Apache. For Apache, there are complete development packages like XAMPP which are preconfigured and already include all relevant software (PHP, MySQL, phpmyadmin, ...). IIS is exotic. You won't get a lot of help for it outside of specialized Microsoft forums, and you might actually have to do your own research (that's scary, I know). Edited July 25, 2016 by Jacques1 1 Quote Link to comment https://forums.phpfreaks.com/topic/301582-http-error-4050-method-not-allowed/#findComment-1534999 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.