Welcome Guest, Not a member yet? Register   Sign In
Sometimes codeigniter is not outputing error
#1

[eluser]runrun[/eluser]
The error code

Code:
class Pass {
    function css()
    {
        $CI =& get_instance();
        $CI->load->library('cssmin');

        $css = CI->cssmin->minify($css);
    }
}

In the code I miss the $ sign, it should be $CI not CI. When I miss this, codeigniter gives me a blank page, which is not cool, I always need it to tell me the error.

How can I config it so that it always output error in every situations ? Further question, how can I make codeigniter so that it will output any errors to a log file not the screen ?
#2

[eluser]SPeed_FANat1c[/eluser]
in the config.php file there is setting

$config['log_threshold'] = 0;

you can change values 0-4 by your need, there is a comment about what those mean in the samse file.
#3

[eluser]pickupman[/eluser]
The log threshhold relates more to the application flow of CI. You may want to check your /index.php file. With the 2.0.+, a define is at the top for [url="http://ellislab.com/codeigniter/user-guide/general/environments.html"]setting the environment[/url]. By default, it is set to 'production', which turns off all php errors which is correct for a production [environment. Set this to 'development' and you will turn PHP errors back on. Also, with the new structure you can have a whole set of config for your development environment (database.php, config.php, etc). Just name a folder development inside of your application/config/ folder.
application
-config
-development
-config.php
-database.php

If you don't wish to have a set of separate config files for the development environment, CI will fallback to the ones in the application\config folder




Theme © iAndrew 2016 - Forum software by © MyBB