piyush piyush - 1 year ago 132
PHP Question

Codeigniter PHP Warning

Following error message is being logged in my codeigniter application :

PHP Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in /usr/src/dealvector/system/core/Exceptions.php on line 167, referer: http://localhost/dealcenter

When I open the /usr/src/dealvector/system/core/Exceptions.php I get following on line 167 :


The value of
is application/

If I appent the absolute path, ie
it is working fine.

What should I do about it ? Please suggest. I am new to code-igniter.

Answer Source

I was not happy with this answer, you should not have to change php.ini for this work.

I tried to find out why the cwd (current working directory) was being reset and if this was different in newer version of php, but couldn't find anything that was useful.

However since the core still had access to APPPATH I simply changed the line in my index.php file to

$application_folder = getcwd().'/../application';

This should allow your code to be transportable still.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download