4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 17, 2018, 12:27:26 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  [1.7 - 1.7.6] Redirects don't work on sites with non-standard port
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: [1.7 - 1.7.6] Redirects don't work on sites with non-standard port  (Read 17519 times)
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 578

mmm PHP...


View Profile WWW
« on: October 20, 2008, 07:09:14 AM »

If a website uses non-standard port (i.e. http://example.com:12345/4images) redirects (i.e. after login or logout) won't work on some browsers (Internet Explorer, Google Chrome).

The problem is in $_SERVER['HTTP_HOST'] which might contain the port number.

To fix this find in global.php:
1
  $script_url .= (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : getenv("SERVER_NAME");

Insert BELOW:
1
  if ($port$script_url str_replace($port""$script_url);
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
xbox1
Pre-Newbie

Offline Offline

Posts: 2

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #1 on: April 30, 2009, 02:51:58 AM »

Thanks a lot....

I fixed it....
Logged
Tino23
Full Member
***
Offline Offline

Posts: 183

Thank You
-Given: 17
-Receive: 4


View Profile WWW
« Reply #2 on: August 31, 2010, 06:24:24 PM »

In der 1.7.8 Version steht an der Stelle
1
if ($port) $script_url = str_replace(":".$port, "", $script_url);
Ist der auch für die 1.7.6 Version gültig?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 578

mmm PHP...


View Profile WWW
« Reply #3 on: September 01, 2010, 05:29:58 AM »

1.7.8 has all the fixes from v1.7 to v1.7.7

(or I didn't understand you question...)
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.229 seconds with 19 queries.
Post your comments here