Commit 9db0b314009067bba26943522941b53d8f35672a
1 parent
15bd7a6c
Merged in from STABLE trunk...
KTS-3595 "URL error after upgrade from 3.4.6 to 3.5.3" Fixed. Added a check for the $_SERVER['HTTP_HOST'], if its empty don't store the configcache Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.3-Release-Branch@9102 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
18 additions
and
0 deletions
config/dmsDefaults.php
| ... | ... | @@ -457,6 +457,24 @@ class KTInit { |
| 457 | 457 | if ($use_cache) { |
| 458 | 458 | $use_cache = $oKTConfig->loadCache($cachePath); |
| 459 | 459 | } |
| 460 | + }else{ | |
| 461 | + if(!isset($_SERVER['HTTP_HOST']) || empty($_SERVER['HTTP_HOST'])){ | |
| 462 | + // If the http_host server variable is not set then the serverName gets set to localhost | |
| 463 | + // We don't want to store this setting so we set store_cache to false | |
| 464 | + $store_cache = false; | |
| 465 | + | |
| 466 | + /* | |
| 467 | + // Check if serverName.txt is set and use that | |
| 468 | + $pathFile = KT_DIR . '/config/cache-path'; | |
| 469 | + $cachePath = trim(file_get_contents($pathFile)); | |
| 470 | + $serverNamePath = $cachePath . '/' . KTUtil::SERVER_NAME_FILE; | |
| 471 | + | |
| 472 | + if(file_exists($serverNamePath)){ | |
| 473 | + $serverName = @file_get_contents($serverNamePath); | |
| 474 | + $_SERVER['HTTP_HOST'] = $serverName; | |
| 475 | + } | |
| 476 | + */ | |
| 477 | + } | |
| 460 | 478 | } |
| 461 | 479 | |
| 462 | 480 | if(!$use_cache) { | ... | ... |