1
votes

Windows 2008 R2 server running PHP 5.3.

I have URL Rewrite for IIS working for our website.

The rewrite is:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{R:1}" pattern="^(images|documents|system|themes|favicon\.ico|robots\.txt|index\.php)" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.php/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

All of the pages (domain.com/contact) work just fine. But when posting a form, I get a 500.0 server error...which MSFT says has to do with rewrite or module errors.

I installed Fiddler and the Raw Request headers in TextView look like so

POST http://stage.domain.edu/ HTTP/1.1
Accept: image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap
Referer: http://stage.domain.edu/contact
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: stage.domain.edu
Content-Length: 519
Connection: Keep-Alive
Pragma: no-cache
Cookie: exp_last_visit=978203019; exp_last_activity=1293563019; exp_tracker=a%3A5%3A%7Bi%3A0%3Bs%3A7%3A%22contact%22%3Bi%3A1%3Bs%3A5%3A%22index%22%3Bi%3A2%3Bs%3A7%3A%22contact%22%3Bi%3A3%3Bs%3A5%3A%22index%22%3Bi%3A4%3Bs%3A7%3A%22contact%22%3B%7D; exp_last_visit=1293563019; exp_last_activity=1294854559

ACT=27&RET=&URI=contact&recipients=HJAUumiTKThex9cAcYNq%2FyBQNLeXkIqACdl3EgaimNM%3D&user_recipients=7f73421623ceb94b5d06abe41d8663dd&charset=&redirect=&replyto=&site_id=2&subject=Contact+Form&[email protected]&required%5B%5D=Full+Name%3A&required%5B%5D=stephanie&required%5B%5D=Phone%3A&required%5B%5D=954520-1176&sender=E-mail%3A&[email protected]&required%5B%5D=Zip+Code%3A&required%5B%5D=33073&message=This+information+was+submitted+via+the+contact+form.&submit.x=72&submit.y=14

What in here could be causing posting variables to the index.php main file to 500?

1
Anything in the server's error log? Should have more details there. - Marc B
This is what shows up in the error log for that call: 2011-01-12 17:51:04 10.64.181.170 POST / - 80 - 10.64.181.170 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET4.0C;+.NET4.0E) 500 0 258 94534 - Steph Rose
There is nothing in the PHP log. - Steph Rose

1 Answers

1
votes

Just for the sake of completion, the issue was with the server giving 500 errors if anything was wrong, and in the CMS there were 2 issues:

1) I had to set up the SMTP config correctly

Then I just got a blank page.

2) What was happening was that the CMS uses /n in emails as newline, and on Windows boxes, the equivalent of a newline is /r/n....so upon changing that in the HTML email config, all worked fine!