dhrrgn / codeigniter-uhoh

A port of the Kohana v3 Error Handler for CodeIgniter.
82 stars 9 forks source link

MY_Exceptions fatal error require() #3

Open daK76 opened 13 years ago

daK76 commented 13 years ago

Hi Last commit introduced a bug in my cibox, as I stated here Maybe it has to do with WAMP default php bin location.

Isolated hunk at line 195 and apearantly fixed my fatal error.

Details: Fatal error: require() [function.require]: Failed opening required 'bonfire/application/errors/error_php_custom.php' (include_path='.;C:\php5\pear') in C:\wamp\www\labAptana\lab-bonfire\bonfire\application\core\MY_Exceptions.php on line 195

Thanks

hv15 commented 11 years ago

I solved the error

Warning: require(application/errors/error_php_custom.php): failed to open stream: No such file or directory in /home/user/website/application/core/MY_Exceptions.php on line 195

Fatal error: require(): Failed opening required 'application/errors/error_php_custom.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/user/website/application/core/MY_Exceptions.php on line 195

it seems that because the call is being made in application/core/MY_Exceptions.php, it can't find error_php_custom.php because it is looking locally for it. I solved this by replacing

require APPPATH . 'errors/error_php_custom.php';

with

require FCPATH . APPPATH . 'errors/error_php_custom.php';

which gives the absolute path from /.

shayhurley commented 10 years ago

Thank you hv15, that solved the issue I was having with uhoh !

hv15 commented 10 years ago

Your welcome @ShayHurley!