• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
system folder & IIS 7

#1
[eluser]Unknown[/eluser]
I have a piece of codeigniter demo code that I'm trying to get running under IIS7. I'm get ting the following error
Quote:Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

Here is a partiall snippet of the index.php

Code:
<?php


/*
*---------------------------------------------------------------
* SYSTEM FOLDER NAME
*---------------------------------------------------------------
*
* This variable must contain the name of your "system" folder.
* Include the path if the folder is not in the same  directory
* as this file.
*
*/
$system_path = 'system';

/*
*---------------------------------------------------------------
* APPLICATION FOLDER NAME
*---------------------------------------------------------------
*
* If you want this front controller to use a different "application"
* folder then the default one you can set its name here. The folder
* can also be renamed or relocated anywhere on your server.  If
* you do, use a full server path. For more info please see the user guide:
* http://ellislab.com/codeigniter/user-guide/general/managing_apps.html
*
* NO TRAILING SLASH!
*
*/
$application_folder = 'C:\Users\rtv823\Documents\My Web Sites\Northwestern\application';



// Set the current directory correctly for CLI requests
if (defined('STDIN'))
{
  chdir(dirname(__FILE__));
}


if (realpath($system_path) !== FALSE)
{
  $system_path = realpath($system_path).'/';
      
}
    
// ensure there's a trailing slash
$system_path = rtrim($system_path, '/').'/';

// Is the system path correct?
if ( ! is_dir($system_path))
{
    
  exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
}

I have some indication as to the problem but I don't know how to fix it.

When I add a line to echo the output of realpath to the index.php
Code:
echo(realpath("."))
the path displayed is
Quote:c:\php-5.4
which is the location of the fast cgi executable set up in IIS.

The output of my debugging statement should clearly be the same as the path to my index.php. In fact if I set the system_path variable to the absolute path the application works fine, however this doesn't seem like a good solution. Does anyone have any ideas as to how to fix this correctly?





Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.