uzsolt
uzsolt

Reputation: 6027

Codeigniter bad system folder path

I've installed CodeIgniter into /usr/share/pear/codeigniter. If I set in my app's index.php

$system_path = '/usr/share/pear/codeigniter/system';

it works everything well.

But when I mount --bind or copy to /pub/codeigniter, and set $system_path to /pub/codeigniter/system, doesn't work and CI displays an error message:

Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

The permissions:

$ ls -ld /usr/share/pear/codeigniter/{,*}
drwxr-xr-x  4 root root 4096 febr  17 13.07 /usr/share/pear/codeigniter/
drwxr-xr-x 15 root root 4096 febr  17 13.07 /usr/share/pear/codeigniter/application
-rw-r--r--  1 root root 6357 febr  17 13.07 /usr/share/pear/codeigniter/index.php
drwxr-xr-x  8 root root 4096 febr  17 13.07 /usr/share/pear/codeigniter/system

$ ls -ld /pub/codeigniter/{,*}
drwxr-xr-x  4 root root 4096 júl   15 13.20 /pub/codeigniter/
drwxr-xr-x 15 root root 4096 febr  17 13.07 /pub/codeigniter/application
-rw-r--r--  1 root root 6357 febr  17 13.07 /pub/codeigniter/index.php
drwxr-xr-x  8 root root 4096 júl   15 13.20 /pub/codeigniter/system

I think the PHP's is_dir function fails but I don't know why.

Any suggestion?

Upvotes: 0

Views: 3888

Answers (1)

uzsolt
uzsolt

Reputation: 6027

My fault: in /etc/php/php.ini should add /pub to open_basedir's list, restart webserver and everything will fine.

Upvotes: 1

Related Questions