Opened 15 years ago
Closed 9 years ago
#9763 closed enhancement (maybelater)
Please include IdeaWebServer in $is_apache (in wp-includes/vars.php)
Reported by: | burghardt | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | 2.7.1 |
Component: | Bootstrap/Load | Keywords: | needs-patch |
Focuses: | Cc: |
Description
IdeaWebServer is a web server software developed an used in largest polish ISP server farm. This software handles over 205972 domains (according to http://top100.pl/). I hope its worth including support for IdeaWebServer in Wordpress.
Installing Wordpress on IdeaWebServer is easy (as it is mostly apache compatible), but two tweaks need to be done.
Tweak 1st: include IdeaWebServer in $is_apache
Tweak 2nd: use only "http://host/redirect" redirections (no "Location: /somewere", only "Location: http://host/somewere")
Here comes the patch (against r11244):
Index: wp-includes/vars.php =================================================================== --- wp-includes/vars.php (wersja 11244) +++ wp-includes/vars.php (kopia robocza) @@ -65,7 +65,9 @@ * Whether the server software is Apache or something else * @global bool $is_apache */ -$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false; +$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || +(strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false) || +(strpos($_SERVER['SERVER_SOFTWARE'], 'IdeaWebServer') !== false)) ? true : false; /** * Whether the server software is IIS or something else Index: wp-includes/pluggable.php =================================================================== --- wp-includes/pluggable.php (wersja 11244) +++ wp-includes/pluggable.php (kopia robocza) @@ -857,6 +857,9 @@ $location = wp_sanitize_redirect($location); + if ($location[0] == '/') + $location = get_bloginfo('url') . $location; + if ( $is_IIS ) { header("Refresh: 0;url=$location"); } else {
Attachments (1)
Change History (20)
#2
follow-up:
↓ 12
@
15 years ago
- Keywords reporter-feedback added; has-patch removed
- Milestone changed from 2.8 to Future Release
#3
follow-up:
↓ 4
@
15 years ago
IdeaWebServer seems to not support sending "Location: relative" or "Location: /root". You cannot login (in fact you can, but you will not be redirected to /admin) and after you add comment you did not get back to article you commented. Fortunately redirections like "Location: http://host/root" works.
How it is buggy? Rewriting a redirection to "something" (i.e. without leading "/") will not be prefixed with blog url?
#4
in reply to:
↑ 3
@
15 years ago
Replying to burghardt:
How it is buggy? Rewriting a redirection to "something" (i.e. without leading "/") will not be prefixed with blog url?
suppose a blog that's in /wordpress/, with an explicit redirect to /. your code will make it redirect to /wordpress/ instead.
#5
@
15 years ago
- Component changed from Upgrade/Install to General
- Keywords needs-patch added; reporter-feedback removed
#8
follow-up:
↓ 9
@
13 years ago
- Severity changed from trivial to normal
Please make a patch or edit the core file so that this web server will be well supported.
I have just subscribed and now.... "surprise" :(
I will be bound with this hosting company for at least other 12 months.
You can see here a some of the many WP blogs hosted under this webserver.
#9
in reply to:
↑ 8
;
follow-up:
↓ 10
@
13 years ago
Replying to utnalove:
Please make a patch or edit the core file so that this web server will be well supported.
I have just subscribed and now.... "surprise" :(
I will be bound with this hosting company for at least other 12 months.
You can see here a some of the many WP blogs hosted under this webserver.
The attached plugin should (in theory at least) workaround the issue without having to modify core files.
#10
in reply to:
↑ 9
@
13 years ago
Replying to kawauso:
Replying to utnalove:
Please make a patch or edit the core file so that this web server will be well supported.
I have just subscribed and now.... "surprise" :(
I will be bound with this hosting company for at least other 12 months.
You can see here a some of the many WP blogs hosted under this webserver.
The attached plugin should (in theory at least) workaround the issue without having to modify core files.
Thank you. If I try to install it as a normal plugin I get this error:
Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
How can I apply the patch?
How can I then test if it works fine?
Will it exclude Apache from the supported web servers or it just adds the support to the new one so that if I will change back to apache WP will continue to work fine?
#11
follow-up:
↓ 13
@
13 years ago
How can I apply the patch?
You will need to install the plugin via FTP. (The one in the Plugin installer only accepts correctly formatted Zip Archives)
#12
in reply to:
↑ 2
@
13 years ago
Replying to Denis-de-Bernardy:
This part is not good/potentially buggy:
+ if ($location[0] == '/') + $location = get_bloginfo('url') . $location; +is it needed, or was it just something you added as an aside?
This should not be needed for the webserver technically. I smell that apache might (would be good to know actually) modify the Location:
response header with relative URIs into ones with absolute URIs which is the requirement by the HTTP standard.
So this plugin is not only fixing the issue with webserver recognition but also with those parts of the code (those parts have been reduced over the last months however) that do wrong redirects. It's a common mistake and I assume that many plugins are failing here as well. I think that's the reason why this has been added as well, but I can not suggest to take that part in.
#13
in reply to:
↑ 11
;
follow-up:
↓ 14
@
13 years ago
Replying to dd32:
You will need to install the plugin via FTP. (The one in the Plugin installer only accepts correctly formatted Zip Archives)
Thanks, installed.
How can I test it to see if it works fine?
#14
in reply to:
↑ 13
@
13 years ago
Replying to utnalove:
Replying to dd32:
You will need to install the plugin via FTP. (The one in the Plugin installer only accepts correctly formatted Zip Archives)
Thanks, installed.
How can I test it to see if it works fine?
Check if WordPress functions normally I think. Not 100% on what the original changes actually affect, but if permalinks and redirects work, then you're probably fine.
#15
@
13 years ago
It looks like everything works fine.
Are there chances to include it in the official WP releases?
#16
@
12 years ago
- Cc medeis added
- Version 2.7.1 deleted
Hi,
this problem still exists in WP 3.5 nevertheless it was targeted to 2.7.1. Are there any chances to add this finally to the latest build?
Seems that the changes are really small, but are completely solving the issues with IdeaWS.
Thank you.
#17
@
12 years ago
- Version set to 2.7.1
Version number indicates when the enhancement was initially suggested.
#19
@
9 years ago
- Milestone Future Release deleted
- Resolution set to maybelater
- Status changed from new to closed
Closing as maybelater. Complete lack of interest on the feature on the ticket over the last 2 years. Feel free to reopen when more interest re-emerges (particularly if there's a patch). There's next to zero documentation on IdeaWebServer. Does it even still exist? This seems like alot of effort for compliance with what seems to be a really really small number of users using it.
This part is not good/potentially buggy:
is it needed, or was it just something you added as an aside?