views:

296

answers:

1

Having a really strange problem.

Scenario: PHP5.2.9, IIS7, PHP running as FastCGI. I have a site at test.concentratedtech.com. Click login, enter OpenID credentials, hit "Verify," and immediate 500 error.

Click Back, resubmit the page, works fine.

An IIS failed request trace reveals two messages, below. These messages seems to generally indicate that all is well, which is apparently enough to trigger an error. WTF.

Any ideas whatsoever? As I say, if you hit back and resubmit, it works perfectly - and you can consistently repeat that experience: Every even-numbered attempt works fine, odd-numbered attempts fail with a 500.

ONE:

ModuleName FastCgiModule 
Data1 FASTCGI_RESPONSE_ERROR 
Data2 Successfully fetched 'http://concentrateddon.myopenid.com/': GET response code 200

ErrorCode 5 
ErrorCode Access is denied. (0x5)

TWO:

ModuleName FastCgiModule 
Notification 128 
HttpStatus 500 
HttpReason Internal Server Error 
HttpSubStatus 0 
ErrorCode 0 
ConfigExceptionInfo  
Notification EXECUTE_REQUEST_HANDLER 
ErrorCode The operation completed successfully. (0x0
A: 

Well... I'm a little incredulous but I've been randomly making changes and testing after each one.

I turned PHP's error display to off (normal production setting, but this machine is still in test so errors were being displayed). The problem went away.

I'm surmising that the 200 ("OK") response was somehow being logged as an "error" by the Yadis OpenID library. With an error to display, PHP tossed a 500. With error display off, PHP just sucks it up and keeps going. I guess.

UPDATE: Actually, the trick is the error must have SOMEWHERE to go. I disabled error display and enabled error LOGGING (e.g., to the Windows app event log, but could also be to a file), and all's well.

Don Jones