Welcome Guest, Not a member yet? Register   Sign In
new Functions blank Page after CI-Update
#1

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
Reply
#2

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

https://stackoverflow.com/questions/3580...port-php-7
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply
#3

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.
Reply
#4

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.
Reply
#5

(This post was last modified: 09-10-2018, 12:14 PM by ivantcholakov. Edit Reason: Addessing )

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

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




Theme © iAndrew 2016 - Forum software by © MyBB