Loading...
 
Skip to main content

Incorrect base path detected when installing on IIS (Directory does not exist errors)

Status
Closed
Subject
Incorrect base path detected when installing on IIS (Directory does not exist errors)
Version
2.x
Category
  • Error
Feature
Installer (profiles, upgrades and server-related issues)
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Submitted by
wondertrout
Volunteered to solve
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

When running the installer on IIS the incorrect root path is detected. The directory tikiwiki is installed into is being stripped from the directory hierarchy.

The problem including the solution is referenced in the forum thread at http://tikiwiki.org/tiki-view_forum_thread.php?forumId=6&comments_parentId=26943&highlight=directory%20does%20not%20existQuestion

Solution
I attempted a fix for this in Tiki 5 (r26029) based on advice from Wade Hildo. Please report if you experience this issue with Tiki 5 or later.
Workaround

Change lib/setup/tikisetup.class.php from:

if (strpos($_SERVER"SERVER_SOFTWARE","IIS")==TRUE){
if (array_key_exists('PATH_TRANSLATED', $_SERVER)) {
$docroot = dirname($_SERVER'PATH_TRANSLATED');
print $_SERVER'PATH_TRANSLATED';
print dirname($_SERVER'PATH_TRANSLATED');
} else {
$docroot = getcwd();
}
}
else{
$docroot = getcwd();
}


to

if (strpos($_SERVER"SERVER_SOFTWARE","IIS")==TRUE){
if (array_key_exists('PATH_TRANSLATED', $_SERVER)) {
$docroot = getcwd();
print $_SERVER'PATH_TRANSLATED';
print dirname($_SERVER'PATH_TRANSLATED');
} else {
$docroot = getcwd();
}
}
else{
$docroot = getcwd();
}

Importance
6
Priority
30
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2041
Created
Thursday 25 September, 2008 00:17:16 UTC
by Unknown
LastModif
Friday 23 September, 2011 20:17:27 UTC


Show PHP error messages