Closed jrchamp closed 4 years ago
I think that is a great idea and is something we probably should do in the first place. If you have time @jrchamp and want to put this into a quick PR, that'd be great. If not, I'll try to take care of it next week during my routine maintenance work.
This will be implemented in the pending 2.2 release. Thanks for the suggestion @jrchamp!
Reopened because of the issues found in #64. Once we hear back from the reporters, we can attempt to resolve the issue in cPanel environments.
From my sysadmin
Shibboleth runs as a daemon, outside of apache.
That said, php is also running with fcgi and not mod_php
Could you @jdpurdyvi possibly add a file somewhere in the same location as your WordPress install with this and provide the output:
<?php
print_r(apache_get_modules());
?>
The output should be something like:
Array
(
[0] => core
[1] => http_core
[2] => mod_so
[3] => sapi_apache2
[4] => mod_mime
[5] => mod_rewrite
)
PHP is running with fcgi so apache_get_modules() is not available e.g.
[18-Jun-2020 20:39:34 UTC] PHP Fatal error: Uncaught Error: Call to undefined function apache_get_modules() in /my/wp/path:57
Haha, of course it is. Can you try seeing if the module name shows up in phpinfo()
?
Short answer is no. But I sent you the full output of phpinfo() privately @michaelryanmcneill in case you want to verify.
The admins for our cPanel host said that they were able to make things work by using the filename instead of the identifier for the module: <IfModule mod_shib.cpp>
Not sure if that will be the case for all cPanel environments though.
mod_shib.cpp
makes sense because the Shibboleth SP module is written in C++.
Just to be safe, I've gone ahead and added mod_shib.c
and mod_shib.cpp
in addition to mod_shib
. I've committed it with 7affc23 and I've created a draft release. If @dandalpiaz, @jdpurdyvi, and @jrchamp (and others) could test it out before I release it to the WordPress.org repository, that would be wonderful. I want to try and avoid breaking things for others again if possible. If I don't hear anything back I'll release it on Tuesday afternoon.
I tested this configuration on my test system and it's working for me, but the previous change did also.
Thanks @jrchamp!
mod_shib.cpp
is what works on my host. Thanks!
The mod_shib.cpp
conditional is working on our cPanel host as well. Thanks @michaelryanmcneill !
Great, with these confirmations, I'll merge these changes and push the release out.
This came up on the WordPress plugin support forum: https://wordpress.org/support/topic/sibboleth-installation-internal-server-error/
It's fair to say that we do expect people to install the mod_shib package before installing our plugin, but it might also be good to not take their site offline. In that ticket, I suggest wrapping the Shibboleth configuration directives in an
IfModule
block, as in:Is this something that we would be interested in adding to the core plugin? If so, I'd be happy to create a pull request.