Jump to content

Warning: chdir() [function.chdir]: open_basedir restriction in effect. Rate Topic   - - - - -

 

Posted 03 April 2012 - 06:36 AM #1

I am getting the warning below when I enter into the product listing details pages in admin;

Warning: chdir() [function.chdir]: open_basedir restriction in effect.
File(/usr/local/lsws/fcgi-bin) is not within the allowed path(s):
(/home/username:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp)
in /home/username/public_html/shop/core/fn.fs.php on line 121

Anyone have any idea why this may be happening?
CS Cart 2.1.2
Apache version 2.2.21
PHP version 5.3.10

 
  • orangegirl
  • Support engineer
  • CS-Cart Support
  • Join Date: 08-Jan 08
  • 552 posts

Posted 04 April 2012 - 08:59 AM #2

Hello!

In order to resolve the problem, please try to replace the following part of code:
if (!empty($old_dir)) {
        chdir($old_dir);
    }

    return $result;
}
with this one:
if (!empty($old_dir) && $old_dir != '/') {
        chdir($old_dir);
    }
    return $result;
}
in the fn.fs.php file, located in the core directory of your CS-Cart installation.
Kate Lazarevskaya,
CS-Cart Support Engineer
CS-Cart Knowledge Base | CS-Cart Reference Guide