Server Error 500 when logging into wp-admin with plugin
Closed this issue · 1 comments
My environment:
Windows Server 2012 R2, IIS 8, PHP 7.2.7
I have an IIS/PHP/WordPress web server with 2 websites - one QA and one Prod. I tried installing the OKTA sign-in widget plugin on both - it worked perfectly fine on QA but I'm getting an Internal Server Error 500 on the Prod site when logging into wp-admin. Basically the OKTA sign-in page shows up fine. If I input an incorrect password, it says Sign-In failed, great. But if I input correct admin credentials I get the IIS error 500 page.
I enabled an IIS req trace and got this error:
ModuleName: FastCgiModule
Data1: FASTCGI_RESPONSE_ERROR
Data2: Logging in WordPress user with ID of: 12
ErrorCode: Access is denied. (0x5)
I'm not sure where Data2 is pulled from, but I found that line (Logging in Wordp...) in the widget code here in github. Seems to be the last thing called by the plugin.
I've gone through the following already:
- It worked perfectly on the QA site, so my plugin installation method is correct
- I checked file permissions on both sites, comparing, they both seem identical
- All other plugins/themes/etc work fine on Prod
- I recreated original .htaccess fine, still didn't work
Any tips on where to go from here?
Issue resolved, it ended up being incorrect file permissions on the PHP error log file. The okta-widget.php script always tries to write a log to the PHP error log file and that's the point where it was failing, resulting in an Access Denied error by PHP FASTCGI, which in turn resulted in an IIS 500 server error.