Script not working on Windows server
Brought to you by:
taoteh1221
Hi,
I have implemented DFDMailer on a test server (mac based with MAMP) and it works beautifully. However our web server at our internet host is Windows and they do not have linux OS servers that we could migrate to. I can't get the script to mail from the web host's server I get the "There is a problem with the request" error.
How do I modify the script to work on a windows server?
Thanks for your help.
Regards
Greg
First off, in this instance are you running this script from a .com/php-bin/ location, and are you sure php is supported? It sounds like the script isn't returning a 200 code (basically OK / SUCCESS), so maybe you are getting a 403 or 404 (error code) from a wrong directory location/permission?
What do you see if you type into your browser http://YOURDOMAIN-HERE.com/php-bin/form.mail/form.mailer.php
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Thanks for the response.
I'm getting a 500 error - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.
Greg
Is you HTTP server IIS or Apache?
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Sadly it is IIS, It's at a web host that only uses windoze servers, so I can't do anything like moving over to linux hosting.
Hi Greg.
Darn...if it was Apache I'd recommend checking your root .htaccess file (there must be an equivalent for IIS?), but I'm sorry to say I never use IIS.
The only way I can think of to troubleshoot this is if you are comfortable creating a temp FTP login so I can try re-writing DFD Mailer to run on your IIS setup? If you'd like, you can send any login details to me at http://www.dragonfrugal.com/contact/ and I'll give it a go.
-Mike
Hi Mike
Thanks for the offer of help.
When I get in on Monday morning I will create a temp ftp account and send you the details.
Any help you can render will be much appreciated.
Regards
Greg
Will do...whenever you have time I should be able to fit you in my schedule easily enough.
-Mk
Mike.
Thanks, I have sent you the details via your contacts page.
Greg
Got them...thanks very much,
Mk
Greg,
I found the problem...whomever installed the script used a copy that had been modified. A new copy directly from sourceforge would have worked fine.
In the ajax.request.js file, someone replaced
http_request.open('POST', '/php-bin/form.mail/form.mailer.php', true);
with no "/" in front of the php-bin
http_request.open('POST', 'php-bin/form.mail/form.mailer.php', true);
In the form.mailer.php file, someone put this at the top of the file
// The lines below are for error reporting, comment out when in production
ini_set ("display_errors", "1");
error_reporting(E_ALL);
// Turn off all error reporting...what hackers don't know is good for your server
// error_reporting(0);
When it should have just been this
// Turn off all error reporting...what hackers don't know is good for your server
error_reporting(0);
Beyond that, I did notice although the form submitted properly after I fixed these issues, no email was sent. This could be two things I can think off, off the top of my head:
1) Your host requires you to whitelist all formmail recipient email addresses
2) I have seen windows servers not properly setup to send mail via PHP...here is a fix that has worked for me in the past...just fill in / uncomment the appropiate data:
/
If your on a Windows server and php mail() function does not appear setup properly, this set to a valid email on the included server should reveal it (and make mail function work).../
//ini_set("SMTP", "www.yourdomain.com");
//ini_set("sendmail_from", "you@yourdomain.com");
//mail(); // Kickstarts a funky windows setup it seems...leave "mail();" as-is
Hope this helps, if you still have any issues please feel free to let me know?
Thanks for your interest in DFD Mailer,
Mike
I just released an upgrade to v.1.11 on sourceforge that includes the workaround for Windows / PHP's mail() function not being configured properly...if that is indeed the issue on your server. It's in the config file.