[wp-trac] [WordPress Trac] #36486: is_apache in vars.php does not always work
WordPress Trac
noreply at wordpress.org
Mon Apr 11 22:42:12 UTC 2016
#36486: is_apache in vars.php does not always work
---------------------------+-----------------------------
Reporter: amandato | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 4.4.2
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
The $is_apache variable does not always work when using an Apache module
like security2_module with the SecServerSignature option. By removing the
word "Apache" from the name of the server vars.php will no longer detect
that the server is Apache.
A simple solution is to add an addition check: ||
function_exists('apache_get_version')!== false
Any Apache only function will work.
See attached patch from WP 4.4.2
I discovered this caused issues with the RewriteRules, randomly WordPress
would add index.php/ within the permalinks when editing the permalink
options in the wp-admin.
Not sure if this should be called a bug or an enhancement, leave it up to
core team to decide that.
I would not remove the first 2 checks though, it is possible that the
apache_get_version is disabled in the php.ini. I would recommend adding
the option to the current checks just to be 100% sure.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36486>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list