Charas-Project
TESTING & WELCOME BOARD => Test & welcome board => Site News => Topic started by: Osmose on January 12, 2010, 07:36:22 AM
-
So after two and a half hours of fighting, I finally pinpointed the issue with the white screen bug and have, as far as I can tell, eliminated it.
If you encounter the bug at all, post in this thread giving as many details as you can about what you were doing at the time.
-
For those who care, the issue was with line formatting. Somewhere along the way a code editor I used couldn't handle UNIX line endings (LF instead of just CRLF) and treated them as two newlines instead of one. This caused a fun little php effect:
<?php
// Code lolz
became:
<?php
// Code lolz
The difference is in the extra newline at the top of the file. See, anything outside of the magic <?php tag is considered output (this makes it easy to shove PHP code in the middle of an HTML webpage). So there was a newline of output being sent to your browser for each PHP page included. Normally not an issue...
...except when submitting a form. SMF uses redirects to bounce you from the various login2 and post2 and so on pages to where you need to go. Redirects use a function called header:
<?php
// Redirects to google
header("Location: http://www.google.com");
But there's a restriction: headers cannot be sent after any output has been sent to the web browser. Thus, the newlines added in were being output before the redirects, causing the redirect to fail and leaving you at a blank white screen.
So yeah. Reformatted all of the forum code and reuploaded it, and things SHOULD be working. As mentioned before, let me know if anything else is acting up now.
-
Yes. Rock on, Osmose.
-
I'm hoping this'll also fix the "timout" bug?
EDIT: Does this have to do with the "hack"?
-
My guess is that, when he went to fix the the main page glitch, he must've formatted incorrectly at some point. Either that, or the tech folks did some code changing when they were fixing the hack. Therefore, indirectly, yes, this could've been a product of the hack.
-
Just cause you asked, I'm not having any issues with clicking the boxes instead of the links.
Although clicking with the middle mouse button, to open in a new tab, acts kind of odd.
It opens it up in the current tab and the new tab simultaneously.
-
Just cause you asked, I'm not having any issues with clicking the boxes instead of the links.
Although clicking with the middle mouse button, to open in a new tab, acts kind of odd.
It opens it up in the current tab and the new tab simultaneously.
I've had difficulties with the middle mouse button/scroll wheel click, too, but that's always been there.
-
Yeah, just hoping we find out why that happens :P
-
YES. Thank you. Спасибо.
-
Just cause you asked, I'm not having any issues with clicking the boxes instead of the links.
Although clicking with the middle mouse button, to open in a new tab, acts kind of odd.
It opens it up in the current tab and the new tab simultaneously.
Yeah, that is a consequence of the click-in-box functionality. I'm considering removing it if it bothers enough people.
I'm hoping this'll also fix the "timout" bug?
EDIT: Does this have to do with the "hack"?
I don't know what specifically you're referring to with the timeout bug, but again, just lemme know if anything else is broken.
Also, this doesn't have anything to do with the hack itself or the fixes we made. Rather, the formatting problems occurred a long time ago and only recently started affecting things. But, in fixing the hack, we did notice some of the problems, so in a way it's related.
-
Good. Awesome. Incredible. Wonderful. Etc.
Thank you Osmose sir.
About the "time out" bug: When trying to post, or even log out, you'd get a message saying you couldn't because your session had timed out. The only way to get rid of that bug was to erase cookies and log back in, but now you'd have to deal with the blank page... but thanks to you, there is no need to worry about it anymore.
*salute*
-
Please let me post please let me post please let me post.
EDIT: Huzzah, finally! Thanks Osmose.
-
Oh thank God. I haven't been able to do much of anything since this problem first started. Ozzy, you're the best.
-
The white space on top?
Duh, i'm afraid it was my bad, sorry....
The scan i created to parse and remove the malicious code of the hack left those spaces up there, i'm quite sure.
As the scan also found and removed that code in other site parts (not only forums), perhaps it's the same thing causing the Complete Resources issue too?
-
*Gasp!*
If so, that'd very very lucky wouldn't it? I hope that everything gets ship shape! In the meantime, I'm going to sit back relax, and enjoy a commercial break.
-
Mods = Gods
-
GODMOD. The position must be made immediately.
-
No. Admin should suffice.
Charas isn't a religion, so no God!
-
no God!
Atheist!
-
GODMOD. The position must be made immediately.
Wahahaha.
-
I don't know if it's right place for it, but I decided if I post this issue here it will be noticed quickly. When I trying to open resource list I getting "Fatal error: Call to undefined function treeLoad() in /home/content/c/h/a/charashosting/html/resources.php on line 111". I am programmer and I know what is going on, maybe even can fix that, but I don't have access to code so I please fix it, because I need some resources from here, ok?
-
Fixed the issue in CR. Generators appear to be working as well (Alex fixed that one). We may be back to working order, folks!
-
Everything is fixed. Good job Osmose.