Finding parse errors.... - 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: Finding parse errors.... (/showthread.php?tid=26159) |
Finding parse errors.... - El Forum - 01-07-2010 [eluser]deco10[/eluser] 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. Suggestions? Thanks! Finding parse errors.... - El Forum - 01-07-2010 [eluser]n0xie[/eluser] Did you turn on error reporting? Finding parse errors.... - El Forum - 01-07-2010 [eluser]deco10[/eluser] You mean this? error_reporting(E_ALL); ini_set('display_errors', '1'); I have that at the top of my conroller.php file. Finding parse errors.... - El Forum - 01-07-2010 [eluser]n0xie[/eluser] 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? Finding parse errors.... - El Forum - 01-07-2010 [eluser]deco10[/eluser] 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? Finding parse errors.... - El Forum - 01-07-2010 [eluser]n0xie[/eluser] Change line 12 in your index.php: Code: error_reporting(E_ALL); Finding parse errors.... - El Forum - 01-07-2010 [eluser]deco10[/eluser] I knew it was simple I just had it in the wrong place. Thanks a million! Finding parse errors.... - El Forum - 01-07-2010 [eluser]n0xie[/eluser] BTW you might want to use STRICT mode if you are using PHP5 Code: error_reporting(E_ALL | E_STRICT); |