CodeIgniter Forums

Full Version: Error Codeigniter PHP could not open the stream: Rights denied
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been working on a project that uses tokens. I work on it in Windows 7 and it is fine, but after I ported this project on Ubuntu to work on it there, It gives me this error in every page / control / method that I try try to access:

Warning: require_once(/opt/lampp/htdocs/TS_Project/system/core/CodeIgniter.php): failed to open stream: Permission denied in /opt/lampp/htdocs/TS_Project/index.php on line 202

Fatal error: require_once(): Failed opening required '/opt/lampp/htdocs/TS_Project/system/core/CodeIgniter.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/TS_Project/index.php on line 202

The CodeIgniter.php file does not exist, the path to it is correct and I can read and write in it (I can open it in a text editor and modify it freely). I tried changing file permissions using chmod command but nothing happened. Why is permissions denied in theĀ CodeIgniter.php file?

What is the TS_Project folder permissions?
i agree with @php_rocs that would be one thing to check. Linux has some quirks and then when you add something that is not "technically" installed on system thats why its in opt such as xampp hten that adds further quirks.

So assuming T_Project is your web dev then open a terminal and use these commands:

cd /opt/lampp/htdocs

sudo ls -ld  T_Project
//come back with output please

generally directories should be 755 and files 644 . I had a problem with index.php in public directory of CI4.0.4 ; chmod was 777, the server didn't like it. I changed it to 644 and that fixed issue.

Now the other thing i wondering is the index.php which has more than 200 lines, as indicated by your error. Not sure which Ci your using but index.php in public of Ci4 is only circa 50 lines long. There is an index.php of xampp and i'm wondering if thats getting involved.