Where is the errors console?


I'm new to PHP, started with Code Igniter and MAMP. I start the server from the MAMP application, and write PHP in the text editor.

When errors occur in the code, the page doesn't display anything! Is there anyway to see the errors on console? or PHP just doesn't show errors?

I'm used to Eclipses console when developing Java, is there anything similar?

3/11/2010 1:57:13 PM

Accepted Answer

Error Reporting

In your code add :

 // I don't know if you need to wrap the 1 inside of double quotes.

or you can do it from your php.ini file.


I'm used to Eclipses console when developing Java, is there anything similar?

Yes, there is Zend Studio - Eclipse, and also PHP IDE by Eclipse.

ZS - http://www.zend.com/en/products/studio/

Eclipse - http://www.eclipse.org/downloads/

3/11/2010 2:12:45 PM

The errors should be displayed, looks like a supression issue which the others have covered. Something to look into is the application/config/config.php file that contains run-time configuration for the CodeIgniter framework:

(starting line number 166:)

166 |    0 = Disables logging, Error logging TURNED OFF
167 |    1 = Error Messages (including PHP errors)
168 |    2 = Debug Messages
169 |    3 = Informational Messages
170 |    4 = All Messages
171 |
172 | For a live site you'll usually only enable Errors (1) to be logged otherwise
173 | your log files will fill up very fast.
174 |
175 */
176 $config['log_threshold'] = 4;

This throws all errors, even if they aren't displayed into the Codeigniter logs folder (refer to your documentation for the location of this in your installed version.)

Hope that helped!

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow