CodeIgniter Forums
new Functions blank Page after CI-Update - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: new Functions blank Page after CI-Update (/showthread.php?tid=71652)



new Functions blank Page after CI-Update - mercomtw - 09-10-2018

Hello,

and sorry for my english.
After CI-Update from 3.1.5 to 3.1.9 AND PHP from 5.4 to 7.1 i got a blank Page for all functions i wrote after this Update.
display_errors is on, No Error in PHP Error-Log, no Error in CI-Log, no error if I set Error_reporting (E_ALL) or E_STRICT.

I don't know what i can do now. If I make a var_dump($var); Nothing happens, BUT, if I make a var_dump($var); exit; I
got the Output from $var. Im confused Huh . Can someone help me? All other functions befor this Update are working.

BR Maik


RE: new Functions blank Page after CI-Update - ignitedcms - 09-10-2018

Hmm that's curious, can you provide any more information, I was looking here

https://stackoverflow.com/questions/35800130/does-codeigniter-3-support-php-7


RE: new Functions blank Page after CI-Update - ivantcholakov - 09-10-2018

When you've got a blank screen and nothing is reported or logged, probably a fragment of code has a syntax error, PHP parsing fails. It might be your code or if you use packages added with Composer it might be there. When I am out of options of guessing where the error might be I use a very simple trick. Starting from the file index.php I follow code and put temporarily the line
echo '!!!'; exit;
When this output is seen, the code works to this point. Move this line down and refresh the page and so on till the moment the output disappears. Thus you can locate the problematic piece of code.

This is a very rudimentary trick, but for testing directly on the server when you start a new site it might be the only choice sometimes.


RE: new Functions blank Page after CI-Update - Pertti - 09-10-2018

Hah, that's pretty much the method I use to quickly figure things out, it's dirty but gets quick results if you don't have to worry about defacing the site while you debug, but hey, the quicker you solve the problem, the better, right?

I use slightly modified version of this method.

First I put the line roughly in the middle of the code, if message appears, the issue is bottom part, if message doesn't appear, it's with the top part of source code. Then I repeat it, using original middle point to split either top or bottom part between two points.

I believe it had something to do with "binary search" logic, but not entirely sure how I came across to use it to pinpoint coding issues.


RE: new Functions blank Page after CI-Update - ivantcholakov - 09-10-2018

@Pertti
I believe, your method is called "Dichotomy". :-)


RE: new Functions blank Page after CI-Update - mercomtw - 09-10-2018

I'm so sorry!!!
My fault, I'm so stupid. Confused
I use a template and forgot this Line $this->template->admin_template($data);