Old:Bugs 3.5-Apollo: config inc php: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
mNo edit summary
m (BobS moved page Bugs 3.5-Apollo: config inc php to Old:Bugs 3.5-Apollo: config inc php without leaving a redirect)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
'''''config.inc.php'''''
'''''config.inc.php'''''


== Bug fix corrects drive letter ==
== Bug fix: corrects drive letter error ==
File: '''config.inc.php'''
File: '''config.inc.php'''
Location: '''*\Uniform Server\udrive\home\admin\www\includes'''
Location: '''*\Uniform Server\udrive\home\admin\www\includes'''


'''Problem:''' In vary rare situations the environment variable “Disk” is not passed to PHP. In this event the script calculates its own path and extracts and uses this disk letter. Unfortunately there is a bug that produces an incorrect drive letter.
'''Problem:''' In vary rare situations the environment variable "Disk" is not passed to PHP. In this event the script calculates its own path and extracts and uses this disk letter. However, there is a bug that produces an incorrect drive letter.


Unfortunately my original fix introduced a problem when installing Uniform Server as a service. The following fixes both problems:   
Unfortunately, my original fix introduced a problem when installing The Uniform Server as a service. The following fixes both problems:   


'''Solution:'''
'''Solution:'''
Line 43: Line 43:
|}
|}


It splits the path at the "home" folder boundary hence the drive will include all sub-folders.
It splits the path at the "home" folder boundary, so the drive will include all sub-folders.


== Download ==
== Download ==
Download this file [http://wiki.uniformserver.com/exeload/bugs35apollo/config.inc.php.txt config.inc.php.txt] save it as '''config.inc.phps''' copy to folder *\Uniform Server\udrive\home\admin\www\includes.
Download this file [http://wiki.uniformserver.com/exeload/bugs35apollo/config.inc.php.txt config.inc.php.txt] save it as '''config.inc.phps''' and copy to folder *\Uniform Server\udrive\home\admin\www\includes.


== Forum reference ==
== Forum reference ==
Line 57: Line 57:
== Proposed solution ==
== Proposed solution ==
See above.
See above.
'''''[[#top | Top]]'''''


----
----
Line 67: Line 65:




[[Category: UniCenter]]
[[Category: Archive]]
[[Category: Support]]
[[Category: Patches]]
[[Category: Troubleshooting]]

Latest revision as of 12:28, 21 June 2013

Uniform Server 3.5-Apollo known bugs or issues.

config.inc.php

Bug fix: corrects drive letter error

File: config.inc.php Location: *\Uniform Server\udrive\home\admin\www\includes

Problem: In vary rare situations the environment variable "Disk" is not passed to PHP. In this event the script calculates its own path and extracts and uses this disk letter. However, there is a bug that produces an incorrect drive letter.

Unfortunately, my original fix introduced a problem when installing The Uniform Server as a service. The following fixes both problems:

Solution:

Replace this section of code (around line 26):
$drive = $_ENV['Disk'] . ":";
if($drive == ":"){ 
 $path = realpath(dirname($_SERVER['config.inc.php'])); 
 $pathArray = explode("\\",$path); 
 $drive="$pathArray[0]/$pathArray[1]"; 
}


With this version:
$drive = $_ENV['Disk'] . ":";
if($drive == ":"){ 
  $path = realpath(dirname($_SERVER['config.inc.php'])); 
  $pathArray = explode("\\home",$path); 
  $drive="$pathArray[0]"; //drive letter and any sub-folders 
  $drive=str_replace("\\","/",$drive); //change backslash to forward slash
}

It splits the path at the "home" folder boundary, so the drive will include all sub-folders.

Download

Download this file config.inc.php.txt save it as config.inc.phps and copy to folder *\Uniform Server\udrive\home\admin\www\includes.

Forum reference

Additional information or background can be found on these forum pages.

Forum reference 1

Forum reference 2

Proposed solution

See above.


Ric