Menu

#1 Script not working on Windows server

open
nobody
None
5
2012-06-15
2010-01-26
Anonymous
No

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

Discussion

  • taoteh1221

    taoteh1221 - 2010-01-26

    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

     
  • Anonymous

    Anonymous - 2010-01-28

    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

     
  • taoteh1221

    taoteh1221 - 2010-01-28

    Is you HTTP server IIS or Apache?

     
  • Anonymous

    Anonymous - 2010-01-28

    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.

     
  • taoteh1221

    taoteh1221 - 2010-01-28

    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

     
  • Nobody/Anonymous

    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

     
  • taoteh1221

    taoteh1221 - 2010-01-30

    Will do...whenever you have time I should be able to fit you in my schedule easily enough.
    -Mk

     
  • Nobody/Anonymous

    Mike.

    Thanks, I have sent you the details via your contacts page.

    Greg

     
  • taoteh1221

    taoteh1221 - 2010-02-01

    Got them...thanks very much,
    Mk

     
  • taoteh1221

    taoteh1221 - 2010-02-01

    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

     
  • taoteh1221

    taoteh1221 - 2010-02-01

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.