0

i don't seem to be able to show errors in codeigniter. I've changed the Index.php file to development and also added error reporting and display errors like this

define('ENVIRONMENT', 'development');    
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
ini_set(‘display_errors’,1);
break;
//....

with this setup I would expect to get errors when, for example, i try to load a model which doesn't exist, or there is a typo in my code or any other error. but all i get is a blank page...

4
  • What happens if you add die('test'); into the development case? Commented Oct 20, 2013 at 20:13
  • i see a blank page with 'test' written on it Commented Oct 20, 2013 at 21:24
  • 1
    I've noticed that the QUOTATION MARKS surrounding display_errors in the ini_set instruction were smart quotation marks. I've changed them to double quotes (") and it now seems to work. Weird!! Commented Oct 20, 2013 at 21:31
  • Always use the ' quotation marks when you're not parsing the string though. Saves you a very small amount of performance. Commented Oct 21, 2013 at 9:15

1 Answer 1

1

Can't you enable error reporting in php.ini?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.