Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • TESTING & WELCOME BOARD »
  • Test & welcome board »
  • Site News (Moderator: Archem) »
  • White Screen Issues Fixed (Hopefully)
« previous next »
  • Print
Pages: [1] 2

Author Topic: White Screen Issues Fixed (Hopefully)  (Read 17612 times)

Offline Osmose

  • So freakin' inactive
  • Royal
  • *
  • Posts: 3,041
White Screen Issues Fixed (Hopefully)
« 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.
« Last Edit: January 12, 2010, 07:38:20 AM by Osmose »
Logged
Hrm.

Offline Osmose

  • So freakin' inactive
  • Royal
  • *
  • Posts: 3,041
Re: White Screen Issues Fixed (Hopefully)
« Reply #1 on: January 12, 2010, 07:38:22 AM »
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:

Code: [Select]
<?php
// Code lolz

became:

Code: [Select]

<?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:

Code: [Select]
<?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.
Logged
Hrm.

Offline Bluhman

  • Global Moderator
  • Royal
  • *
  • Posts: 4,977
Re: White Screen Issues Fixed (Hopefully)
« Reply #2 on: January 12, 2010, 08:17:02 AM »
Yes. Rock on, Osmose.
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: White Screen Issues Fixed (Hopefully)
« Reply #3 on: January 12, 2010, 08:53:30 AM »
I'm hoping this'll also fix the "timout" bug?

EDIT: Does this have to do with the "hack"?
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline Bluhman

  • Global Moderator
  • Royal
  • *
  • Posts: 4,977
Re: White Screen Issues Fixed (Hopefully)
« Reply #4 on: January 12, 2010, 09:01:54 AM »
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.
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: White Screen Issues Fixed (Hopefully)
« Reply #5 on: January 12, 2010, 10:11:52 AM »
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.
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline Bluhman

  • Global Moderator
  • Royal
  • *
  • Posts: 4,977
Re: White Screen Issues Fixed (Hopefully)
« Reply #6 on: January 12, 2010, 10:21:18 AM »
Quote from: fruckert on January 12, 2010, 10:11:52 AM
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.
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: White Screen Issues Fixed (Hopefully)
« Reply #7 on: January 12, 2010, 11:47:55 AM »
Yeah, just hoping we find out why that happens :P
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline MissingName

  • Here you go. Juicy Fruit. Happy?
  • Exemplar
  • *
  • Posts: 1,919
  • The scotch is well hidden. So scram.
Re: White Screen Issues Fixed (Hopefully)
« Reply #8 on: January 12, 2010, 12:16:28 PM »
YES.  Thank you.  Спасибо.
Logged
<sig></sig>

Offline Osmose

  • So freakin' inactive
  • Royal
  • *
  • Posts: 3,041
Re: White Screen Issues Fixed (Hopefully)
« Reply #9 on: January 12, 2010, 02:56:39 PM »
Quote from: fruckert on January 12, 2010, 10:11:52 AM
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.

Quote from: fruckert on January 12, 2010, 08:53:30 AM
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.
Logged
Hrm.

Offline Cerebus

  • The Poison Lord
  • Royal
  • *
  • Posts: 3,486
  • Chemical Rules
Re: White Screen Issues Fixed (Hopefully)
« Reply #10 on: January 12, 2010, 03:55:38 PM »
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*
« Last Edit: January 12, 2010, 04:02:03 PM by Cerebus »
Logged

Offline Dragonium

  • Aieee!
  • Staff
  • Royal
  • *
  • Posts: 3,786
  • MY PRISON IS SHAME
    • Dumb Youtube Stuff
Re: White Screen Issues Fixed (Hopefully)
« Reply #11 on: January 12, 2010, 06:26:52 PM »
Please let me post please let me post please let me post.

EDIT: Huzzah, finally! Thanks Osmose.
Logged

Offline Archem

  • One, one too many schizophrenic tendancies
  • Moderator
  • Over 9000!
  • *
  • Posts: 15,013
  • I made a fortune in toothpicks, but I lost it all in a fire.
Re: White Screen Issues Fixed (Hopefully)
« Reply #12 on: January 12, 2010, 08:55:17 PM »
Oh thank God. I haven't been able to do much of anything since this problem first started. Ozzy, you're the best.
Logged

Offline Alex

  • I am the MASTER!
  • Administrator
  • Exemplar
  • *
  • Posts: 1,130
Re: White Screen Issues Fixed (Hopefully)
« Reply #13 on: January 13, 2010, 02:45:57 AM »
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?
Logged

Offline A Forgotten Legend

  • Your neighborhood box of colors
  • Royal
  • *
  • Posts: 4,428
    • Website
Re: White Screen Issues Fixed (Hopefully)
« Reply #14 on: January 13, 2010, 03:50:23 AM »
*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.
Logged

  • Print
Pages: [1] 2
« previous next »
  • Charas-Project »
  • TESTING & WELCOME BOARD »
  • Test & welcome board »
  • Site News (Moderator: Archem) »
  • White Screen Issues Fixed (Hopefully)
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum