[eluser]Shiro[/eluser]
Dear developer,
OS: Windows 7 SP1
Wamp Server 2.1
PHP 5.2.13
Apache 2.2.11
I just switch 1.7.2 to 2.0.2, I found a "bug". It looks like 1.7.2 index.php done better job than 2.0.2 index.php
My CI is put under another project, more deeper path
\www\my_project\lvl1\lvl2\codeigniter\system
and I first load file is NOT
\www\my_project\lvl1\lvl2\codeigniter\index.php but
is
\www\my_project\index.php then request CI index file
\www\my_project\lvl1\lvl2\codeigniter\index.php
I think this is why the code 2.0.2 not working, but 1.7.2 is working.
When I run the system, I get this:-
Quote:Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php
Code 1.7.2
Code:
if (strpos($system_folder, '/') === FALSE)
{
if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
{
$system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
}
}
else
{
// Swap directory separators to Unix style for consistency
$system_folder = str_replace("\\", "/", $system_folder);
}
Code 2.0.2
Code:
// 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));
}
As the comment state the "Resolve the system path for increased reliability"
I don't think it increased the reliability.
when I ech out $system_path, it show me "system/", no full path has been displayed.
Code:
var_dump(realpath($system_path));
output is
bool(false)
Is this a bug?