CodeIgniter Forums
Debuging Error Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Debuging Error Problem (/showthread.php?tid=5249)



Debuging Error Problem - El Forum - 01-14-2008

[eluser]h54yo[/eluser]
Hi, I am new in CI,

I wonder how I can debug my application, I always get Error 500 and sometimes I miss the semicolon. I have to wastemy time for search it Sad

How I can debug my application with such problem like that

thank you


Debuging Error Problem - El Forum - 01-14-2008

[eluser]tonanbarbarian[/eluser]
In the config/config.php file set
Code:
$config['log_threshold'] = 2;
$config['log_path'] = '/path/to/log/folder/';
This will log anything that CI is doing into a dated file in the specified folder.
You might also want to look here
Error Handling
Profiling Your Application

But if you are getting 500 errors you might not get anything logged as this is your server having problems not the code most likely


Debuging Error Problem - El Forum - 01-14-2008

[eluser]h54yo[/eluser]
I have activated my logs library and using the profiler. and I try to delete the double quotes of my controller ( for try the logs)

but I still get the 500 server error, I expected the CI tell me where is my error (what line no, error msg) like general PHP did

in logs page it just show this

Code:
DEBUG - 2008-01-14 16:51:07 --> Config Class Initialized
DEBUG - 2008-01-14 16:51:07 --> Hooks Class Initialized
DEBUG - 2008-01-14 16:51:07 --> Router Class Initialized
DEBUG - 2008-01-14 16:51:07 --> Output Class Initialized
DEBUG - 2008-01-14 16:51:07 --> Input Class Initialized
DEBUG - 2008-01-14 16:51:07 --> Global POST and COOKIE data sanitized
DEBUG - 2008-01-14 16:51:08 --> URI Class Initialized
DEBUG - 2008-01-14 16:51:08 --> Language Class Initialized
DEBUG - 2008-01-14 16:51:08 --> Loader Class Initialized
DEBUG - 2008-01-14 16:51:08 --> Helpers loaded: url
DEBUG - 2008-01-14 16:51:08 --> Validation Class Initialized
DEBUG - 2008-01-14 16:51:08 --> Session Class Initialized
DEBUG - 2008-01-14 16:51:08 --> Controller Class Initialized
DEBUG - 2008-01-14 16:51:08 --> File loaded: C:\public_html\intra/system/application/views/form/it/addRequest.php
DEBUG - 2008-01-14 16:51:08 --> Language file loaded: language/english/profiler_lang.php

I can not search what is my error Sad

how can I know what line the error occurs

thank you for your information tonanbarbarian Big Grin


Debuging Error Problem - El Forum - 01-14-2008

[eluser]tonanbarbarian[/eluser]
i think you will have to post the code of the controller and view that is not working


Debuging Error Problem - El Forum - 01-14-2008

[eluser]h54yo[/eluser]
Code:
$this->_pageAuth();
            //add validation
            $rules['textRequestNo'] = "required|alpha_numeric;
            $rules['textRequestor'] = "required|numeric";


the error in line

$rules['textRequestNo'] = "required|alpha_numeric;

because there is no closing double quotes, but CI can not show that error, so I have to search the code line by line Sad it's killing me


Debuging Error Problem - El Forum - 01-14-2008

[eluser]Derek Allard[/eluser]
Hey h54yo.

The display of errors is controlled by the error_reporting() level. The logging of errors is controlled by the log_threshold configuration.

Hope this helps.

http://www.derekallard.com/blog/post/error-handling-in-codeigniter/


Debuging Error Problem - El Forum - 01-14-2008

[eluser]h54yo[/eluser]
ok derek

thank you for your help, I will try it first Big Grin


Debuging Error Problem - El Forum - 01-14-2008

[eluser]h54yo[/eluser]
[quote author="h54yo" date="1200390635"]ok derek

thank you for your help, I will try it first Big Grin[/quote]


My Bad Big Grin

it's in my php.ini configuration

display_erros = off

thank you all