Charas-Project

TESTING & WELCOME BOARD => Test & welcome board => Site News => Topic started by: Osmose on December 29, 2009, 03:25:38 PM

Title: Main Page Borked
Post by: Osmose on December 29, 2009, 03:25:38 PM
Triple Update: fixed!

Updated: Main Forum Page is working again, carry on.

Double Update: The Borkpire Strikes Back!

For your convenience, here are a few links to certain boards. If anyone has more to contribute, please do. I, Archem, am far too lazy to do any more work.

All of All (http://www.charas-project.net/forum/index.php?board=12.0)

Forum Gaming (http://www.charas-project.net/forum/index.php?board=32.0)

Games (http://www.charas-project.net/forum/index.php?board=11.0)

Creative Arts (http://www.charas-project.net/forum/index.php?board=30.0)

Tutorials (http://www.charas-project.net/forum/index.php?board=29.0)

So as most of you have seen, the main forum index has been borked for some reason. I'm trying to determine the cause and fix it, but as I'm away from my normal computer I don't have some of the info I need to access the server; I'll be contacting Alex shortly to help me fix the issue.

As for the problem itself, I can only diagnose it based on the error message being given:

Quote
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2179873 bytes) in /home/content/c/h/a/charashosting/html/forum/Sources/Subs.php on line 494

Some people saw Subs.php and assumed it had to do with subscriptions, but this is false; Subs.php stands for "Subroutines". It's a file used by SMF as a general repository for useful functions.

The error itself is referring to a lack of memory (RAM, not harddrive) on the machine the site is hosted on. PHP sets memory limits on how much memory can be taken by a single php script. In addition, our host sets memory limits to ensure that our site doesn't clog up the entire server. The error is that viewing the main page apparently exceeds one of these memory limits. So deleting old topics will not solve the issue.

Once Alex gets back to me we should be able to figure out where this limit is being hit and either change the script or change the memory limit. Until then, the best you can do is browse around using every page but the index.
Title: Re: Main Page Borked
Post by: Alex on December 29, 2009, 04:03:43 PM
Looking at sources and setting, i found nothing strange. However, now everything seems to work again.
Will shortly send a PM to Osmose to explain what i did/checked
Title: Re: Main Page Borked
Post by: Bluhman on December 29, 2009, 07:07:02 PM
Nice work, webmasters!
Title: Re: Main Page Borked
Post by: Uberpwn_w00t on December 29, 2009, 08:07:52 PM
Finally. xD
Title: Re: Main Page Borked
Post by: A Forgotten Legend on December 29, 2009, 08:08:33 PM
This happened quicker than I expected! =D
Title: Re: Main Page Borked
Post by: Archem on December 29, 2009, 10:59:43 PM
I love you all.
Title: Re: Main Page Borked
Post by: ellie-is on December 29, 2009, 11:05:22 PM
Yay.
Title: Re: Main Page Borked
Post by: X_marks_the_ed on December 29, 2009, 11:11:11 PM
BAWWWWWWWWWWW


A few more days and I would've had reason to start anti-Webmaster propaganda.
Title: Re: Main Page Borked
Post by: SaiKar on December 30, 2009, 01:37:47 AM
Is there any way this problem could be handled by shmucks like me? I'd be willing to do it if I had any idea what needed to be done.
Title: Re: Main Page Borked
Post by: Alex on December 30, 2009, 02:12:16 AM
There is no apparent reason for the issue.
It seems there were some sort of loop in a function. I just tried to alter slightly the Subs.php file, and then i reverted it back to original.

In other words, at the end, i changed NOTHING!. But the small test i did probably "unlocked" the loop, or something similar...
Title: Re: Main Page Borked
Post by: Archem on December 30, 2009, 03:12:48 AM
Alex touched it, things stopped being fucked.

It all makes perfect sense, really.
Title: Re: Main Page Borked
Post by: fruckert on December 30, 2009, 03:27:11 AM
Indeed.
Title: Re: Main Page Borked
Post by: Darkfox on December 30, 2009, 05:24:05 AM
Then it rebroke'd. :(
Title: Re: Main Page Borked
Post by: fruckert on December 30, 2009, 05:36:18 AM
Goddammit.
Title: Re: Main Page Borked
Post by: MissingName on December 30, 2009, 05:56:58 AM
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

I didn't even get to see it in unborked form before it borked again.
Title: Re: Main Page Borked
Post by: A Forgotten Legend on December 30, 2009, 07:10:11 AM
*Deadly serious narrator dramatically reading* Will our heroes ever be able to defeat the borkpire?  Found out next week on CHARAS ADVENTURES! *epic fanfare*

*commericial* Are you tired of all that huff and fuss over not being able to read your forum?  Try new ALEX TOUCH from Charas Corp.  Now with extra forum fixing power! Comes in Italian and English.*end commercial*
Title: Re: Main Page Borked
Post by: Ben on December 30, 2009, 07:51:59 AM
I so badly want to Zalgo the **** out of the OP of this thread.
Title: Re: Main Page Borked
Post by: Alex on December 31, 2009, 07:17:55 AM
Admin to the rescue!
This time i really think i got it, all should be fine for real.

For Osmose, some tech details.
Cheking around, i noticed the bug was related to the birthdays array.
The actual query returned 39619 results: a bit too much!
Analyzing it, i found the reason: probably from the old port from old databases, accounts without bdays had the birthdays field set to "0000-00-00".
But SMF default would have been 0001-01-01. And naturally, it ignored this value... but NOT the 0000-00-00.
So i altered the function calendarBirthdayArray which creates that array.
Details of the small change follows.

File: Sources/Calendar.php
Line: 299
changed:
WHERE YEAR(birthdate) != '0001'
to:
WHERE YEAR(birthdate) != '0000' AND YEAR(birthdate) != '0001'

Now the functions returns only 9 values: makes much more sense.

Hopefully now this should be fixed definitively: So, a wonderful Last Year Eve to everyone!
Title: Re: Main Page Borked
Post by: Darkfox on December 31, 2009, 07:33:07 AM
Awesome! You are the MASTER! And happy New Year's Eve!
Title: Re: Main Page Borked
Post by: A Forgotten Legend on December 31, 2009, 08:01:49 AM
=D  Yay!  Just in time for New Years Eve!
Title: Re: Main Page Borked
Post by: fruckert on December 31, 2009, 08:11:16 AM
WEWT
Title: Re: Main Page Borked
Post by: ellie-is on December 31, 2009, 04:02:34 PM
Sweet.
Title: Re: Main Page Borked
Post by: MissingName on January 01, 2010, 04:11:13 AM
Хорошо!
Title: Re: Main Page Borked
Post by: Archem on January 01, 2010, 06:45:33 AM
Kick off '10 the right way!
Title: Re: Main Page Borked
Post by: X_marks_the_ed on January 03, 2010, 01:23:10 PM
So.... this was like our Y2K...  ...10? Only without the mass hysteria and suicide rates.
Title: Re: Main Page Borked
Post by: SaiKar on January 03, 2010, 05:04:28 PM
Who says there wasn't mass suicide, eh? EH?!
Title: Re: Main Page Borked
Post by: Archem on January 04, 2010, 12:54:37 AM
I know I didn't survive.
Title: Re: Main Page Borked
Post by: Linkforce on January 07, 2010, 07:41:57 AM
The system pulls through again!!