I'm using Codeigniter, and instead of error messages I'm just getting a blank page. Is there any way to show PHP error messages instead? It's very hard to debug when I get no feedback.
My environment is Ubuntu with Apache.
Since none of the solutions seem to be working for you so far, try this one:
ini_set('display_errors', 1);
http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
This explicitly tells PHP to display the errors. Some environments can have this disabled by default.
This is what my environment settings look like in index.php
:
/* *--------------------------------------------------------------- * APPLICATION ENVIRONMENT *--------------------------------------------------------------- */ define('ENVIRONMENT', 'development'); /* *--------------------------------------------------------------- * ERROR REPORTING *--------------------------------------------------------------- */ if (defined('ENVIRONMENT')) { switch (ENVIRONMENT) { case 'development': // Report all errors error_reporting(E_ALL); // Display errors in output ini_set('display_errors', 1); break; case 'testing': case 'production': // Report all errors except E_NOTICE // This is the default value set in php.ini error_reporting(E_ALL ^ E_NOTICE); // Don't display errors (they can still be logged) ini_set('display_errors', 0); break; default: exit('The application environment is not set correctly.'); } }
Make sure php5-mysql
is installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With