• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding parse errors....

Normally when I use PHP if there is a parse error it tells me what line its on, gives me a clue at least. If there is a parse error in my controller (which there is) it just shows a blank page. My controller file is extensive and I have no idea where the error is. I'm sure there is an obvious way around this but I can't find it.



Did you turn on error reporting?

You mean this?

ini_set('display_errors', '1');

I have that at the top of my conroller.php file.

Hmmm usually when you get a blank page it's either that error reporting is set to off, or there is an issue with the database. Do you have the database autoloaded?

I stated a scenario in my initial post because that is the case sometimes. However in the case I know where the parse error is (missing ; ) I can fix this and the page displays, I take it out and I get the blank page. Database seems to work just fine either way. Error reporting could very well be set to off. How do I check/change this?

Change line 12 in your index.php:
ini_set(‘display_errors’, ‘1’);

I knew it was simple Smile
I just had it in the wrong place. Thanks a million!

BTW you might want to use STRICT mode if you are using PHP5
error_reporting(E_ALL | E_STRICT);

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.