Last Updated: February 25, 2016
·
5.385K
· josh_devs

Error failed to open stream in Code Igniter

I was trying to setup a new project with CI, usually when testing the setup by typing localhost/ project name CI shows me a welcome page, this time it was a blank page. If you get a blank page go to your php.ini file and search the display_errors var, change it's value to On and restart apache by typing sudo /etc/init.d/apache2 restart in your terminal.

Once you're done with that, try to access your CI project again. Now you'll be able to see an error log on screen that will tell you what's happening. In my case, the error message was:

"require_once(/var/www/test/system/core/CodeIgniter.php) failed to open stream index.php"

So it's a permission thing. To solve it out just type: sudo chmod -R 775 your app directory name and it should be fine
.