News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

blank pages when posting, error log

Started by k8oylos, January 31, 2008, 07:23:07 AM

Previous topic - Next topic

k8oylos

Hi,
I have an smf forum, bridged with joomla.  I am asking this here, as i have changed nothing in the joomla forum/bridge, so i assume it is more likely to be an smf issue.
All of a sudden a couple of days ago, when posting, and when logging in/out, i started getting blank pages.
The post is made, however i just get a blank page.
In the meantime, my error log is finished with 1000s of errors like the ones at the bottom.
Now as i had 1.1.3 installed and there were some problems while trying to update, i reinstalled a new version, 1.1.4 from scratch last night. Everything went smoothly, and i went to sleep last night quite sure that the problem had been solved. And when i got up today, it was all there again. I am going mad


2: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/tikcllbf/public_html/forum/index.php:2)
/home/tikcllbf/public_html/forum/Sources/Load.php
1947
2: Cannot modify header information - headers already sent by (output started at /home/tikcllbf/public_html/forum/index.php:2)
/home/tikcllbf/public_html/forum/Sources/Load.php
1951
2: Cannot modify header information - headers already sent by (output started at /home/tikcllbf/public_html/forum/index.php:2)
File: /home/tikcllbf/public_html/forum/Sources/Subs.php
Line: 3218
Apply Filter: Only show the errors with the same message
2: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/tikcllbf/public_html/forum/index.php:2)
/home/tikcllbf/public_html/forum/Sources/Load.php
1947

k8oylos

Ok i ve got something. Inside the sources folder, the backup files were changed to owner/group 99 99. It seems that every time the server uses a backup file, it goes to 99 99. I replaced that folder with a normal one, and it;s working for now, but i am pretty sure it will happen again. Any ideas why is that?

青山 素子

Probably because the web server or whatever creates those files is user 99 and in group 99, whatever that is named. It's how your web host has things configured.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


k8oylos

i had the host chown everything in the smf folder so that i am the owner now but now the problem persists. The only difference, as far as i can see, is that now the errors are all of the type can not modify header information. i cleaned the error log 5 hours ago and now i have 890 pages of errors. Helppppp!

2: Cannot modify header information - headers already sent by (output started at /home/tikcllbf/public_html/forum/index.php:2)
File: /home/tikcllbf/public_html/forum/Sources/Subs.php
Line: 3221

Apply Filter: Only show the errors with the same message
2: Cannot modify header information - headers already sent by (output started at /home/tikcllbf/public_html/forum/index.php:2)
File: /home/tikcllbf/public_html/forum/Sources/Subs.php
Line: 3218

Apply Filter: Only show the errors with the same message
2: Cannot modify header information - headers already sent by (output started at /home/tikcllbf/public_html/forum/index.php:2)
/home/tikcllbf/public_html/forum/Sources/Load.php
1951

k8oylos

oh, and some session start errors, all of them seem to refer to this line in load.php
2: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/tikcllbf/public_html/forum/index.php:2)
/home/tikcllbf/public_html/forum/Sources/Load.php
1947

青山 素子

Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


k8oylos

one i 'd found here i think some time ago. My first bet would have been using an old bridge, however i hadn't updated anything when this happened all of a sudden.
This is copied from joomla CP
  Simple Machines Forum Registration       option=com_smf_registration      Theodore Hildebrandt      1.1.4      12.03.2006      [email protected]      www.simplemachines.org
SMF Bridge    option=com_smf    Simple Machines    1.1.4    2005.09.05    [email protected]    www.simplemachines.org

青山 素子

Moving to J! bridge support as this might be related to an interaction with the bridge.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


k8oylos

i don't think so. I changed the path to the forum in the bridge backend, so that it points to a non-existent folder, just to see what would happen if i sort of unbridged them. Now i can logout (which seemed not to work correctly before, but it could have been there for ages, as i am always normally logged in) but the white screen remains.
Click post or login/logout and i get a blank screen. Hit back, hit refresh, the post is there



Orstio

#11
Go to your SMF admin panel.  Click on Server Settings.

What is in the filed labelled "Forum URL"?

I just checked your bridged forum URLs.  Have you at any time installed the joomlahacks integration?

k8oylos

It's http://cmfrenzy.com/forum [nofollow]

Thought that's over a year ago and i am not really sure, i think i have tried another bridge (i guess joomlahacks) initially, but i couldn't make it work and uninstalled it after that

k8oylos

I don't know if that's of any help, but here is the physical history of the problem.
A couple of days ago i am notified by members that they can't login or post. I check it and every post or login/logout attempt results in a blank page (though the post is made, login generally not).
As the forum had some other problems as well, i decide to reinstall. I make a fresh install through fantastico, update it to 1.1.4, change config to point to the old database, and also change the directory to the original forum dir, and it works fine. No 99 chown yet it ftp. I go to sleep.
Next morning, the problems reappear. Almost all .bak files are 99 in the sources dir, index.bak the same and a few others as well. As i couldn't change 99 permissions through ftp and didn't have ssh, i tried downloading the sources dir locally, and then renaming the remote /sources to sources2, and then reupload my local copies. After that, owner is set to me. The forum works for half an hour. Then files are back to 99. I ask my host to chown the whole server, but this time the errors remain.
I do another fresh install last night. Today as i get up, the forum is again messed, with 99s all over the place, and the blank pages showing continuously. I did a third fresh install and this time i got putty and set it to chown everything to me straight after the install. I don't know for how long it will work (or if the problem is indeed this), but it does for now (last time it took 7 hours for everything to go wrong)
http://cmfrenzy.com/forum [nofollow]
the old version (yesterday's install, where the blank pages still exist) is here
http://cmfrenzy.com/forum12 [nofollow]

Orstio

Can you post the contents of your SMF index.php in between [ code ] tags here?

k8oylos

No luck. This time it only lasted two hours. It's broken again, and this time there are no 99s in the ftp

Here is index.php
I didn't pretty much get what you mean tags, here is the whole index.php

<head><div style="display: none;"><a href="http://thefmscene.co.uk/forums"><img border="0" src="http://thefmscene.co.uk/forums/21" /></a></div></head>
<?php
/**********************************************************************************
* index.php                                                                       *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel ([email protected])                    *
* =============================================================================== *
* Software Version:           SMF 1.1.4                                           *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/


/* This, as you have probably guessed, is the crux on which SMF functions.
Everything should start here, so all the setup and security is done
properly.  The most interesting part of this file is the action array in
the smf_main() function.  It is formatted as so:

'action-in-url' => array('Source-File.php', 'FunctionToCall'),

Then, you can access the FunctionToCall() function from Source-File.php
with the URL index.php?action=action-in-url.  Relatively simple, no?
*/

$forum_version 'SMF 1.1.4';

// Get everything started up...
define('SMF'1);
@
set_magic_quotes_runtime(0);
error_reporting(E_ALL);
$time_start microtime();

// Load the settings...
require_once(dirname(__FILE__) . '/Settings.php');

// And important includes.
require_once($sourcedir '/QueryString.php');
require_once(
$sourcedir '/Subs.php');
require_once(
$sourcedir '/Errors.php');
require_once(
$sourcedir '/Load.php');
require_once(
$sourcedir '/Security.php');

// Using an old version of PHP?
if (@version_compare(PHP_VERSION'4.2.3') != 1)
require_once($sourcedir '/Subs-Compat.php');

// If $maintenance is set specifically to 2, then we're upgrading or something.
if (!empty($maintenance) && $maintenance == 2)
db_fatal_error();

// Connect to the MySQL database.
if (empty($db_persist))
$db_connection = @mysql_connect($db_server$db_user$db_passwd);
else
$db_connection = @mysql_pconnect($db_server$db_user$db_passwd);

// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name$db_connection))
db_fatal_error();

// Load the settings from the settings table, and perform operations like optimizing.
reloadSettings();
// Clean the request variables, add slashes, etc.
cleanRequest();
$context = array();

// Determine if this is using WAP, WAP2, or imode.  Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should.
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
$_REQUEST['wap2'] = 1;
elseif (isset(
$_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
{
if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
}

if (!
defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

// Some settings and headers are different for wireless protocols.
if (WIRELESS)
{
define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' '')));

// Some cellphones can't handle output compression...
$modSettings['enableCompressedOutput'] = '0';
// !!! Do we want these hard coded?
$modSettings['defaultMaxMessages'] = 5;
$modSettings['defaultMaxTopics'] = 9;

// Wireless protocol header.
if (WIRELESS_PROTOCOL == 'wap')
header('Content-Type: text/vnd.wap.wml');
}

// Check if compressed output is enabled, supported, and not already being done.
if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0)
{
// If zlib is being used, turn off output compression.
if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION'4.2.0') == -1)
$modSettings['enableCompressedOutput'] = '0';
else
ob_start('ob_gzhandler');
}
// This makes it so headers can be sent!
if (empty($modSettings['enableCompressedOutput']))
ob_start();

// Register an error handler.
set_error_handler('error_handler');

// Start the session. (assuming it hasn't already been.)
loadSession();

// What function shall we execute? (done like this for memory's sake.)
call_user_func(smf_main());

// Call obExit specially; we're coming from the main area ;).
obExit(nullnulltrue);

// The main controlling function.
function smf_main()
{
global $modSettings$settings$user_info$board$topic$maintenance$sourcedir;

// Special case: session keep-alive.
if (isset($_GET['action']) && $_GET['action'] == 'keepalive')
die;

// Load the user's cookie (or set as guest) and load their settings.
loadUserSettings();

// Load the current board's information.
loadBoard();

// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
loadTheme();

// Check if the user should be disallowed access.
is_not_banned();

// Load the current user's permissions.
loadPermissions();

// Do some logging, unless this is an attachment, avatar, theme option or XML feed.
if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach''jsoption''.xml')))
{
// Log this user as online.
writeLog();

// Track forum statistics and hits...?
if (!empty($modSettings['hitStats']))
trackStats(array('hits' => '+'));
}

// Is the forum in maintenance mode? (doesn't apply to administrators.)
if (!empty($maintenance) && !allowedTo('admin_forum'))
{
// You can only login.... otherwise, you're getting the "maintenance mode" display.
if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout'))
{
require_once($sourcedir '/LogInOut.php');
return $_REQUEST['action'] == 'login2' 'Login2' 'Logout';
}
// Don't even try it, sonny.
else
{
require_once($sourcedir '/Subs-Auth.php');
return 'InMaintenance';
}
}
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login''login2''register''register2''reminder''activate''smstats''help''.xml''verificationcode'))))
{
require_once($sourcedir '/Subs-Auth.php');
return 'KickGuest';
}
elseif (empty($_REQUEST['action']))
{
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir '/BoardIndex.php');
return 'BoardIndex';
}
// Topic is empty, and action is empty.... MessageIndex!
elseif (empty($topic))
{
require_once($sourcedir '/MessageIndex.php');
return 'MessageIndex';
}
// Board is not empty... topic is not empty... action is empty.. Display!
else
{
require_once($sourcedir '/Display.php');
return 'Display';
}
}

// Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function).
$actionArray = array(
'activate' => array('Register.php''Activate'),
'admin' => array('Admin.php''Admin'),
'announce' => array('Post.php''AnnounceTopic'),
'ban' => array('ManageBans.php''Ban'),
'boardrecount' => array('Admin.php''AdminBoardRecount'),
'buddy' => array('Subs-Members.php''BuddyListToggle'),
'calendar' => array('Calendar.php''CalendarMain'),
'cleanperms' => array('Admin.php''CleanupPermissions'),
'collapse' => array('Subs-Boards.php''CollapseCategory'),
'convertentities' => array('Admin.php''ConvertEntities'),
'convertutf8' => array('Admin.php''ConvertUtf8'),
'coppa' => array('Register.php''CoppaForm'),
'deletemsg' => array('RemoveTopic.php''DeleteMessage'),
'detailedversion' => array('Admin.php''VersionDetail'),
'display' => array('Display.php''Display'),
'dlattach' => array('Display.php''Download'),
'dumpdb' => array('DumpDatabase.php''DumpDatabase2'),
'editpoll' => array('Poll.php''EditPoll'),
'editpoll2' => array('Poll.php''EditPoll2'),
'featuresettings' => array('ModSettings.php''ModifyFeatureSettings'),
'featuresettings2' => array('ModSettings.php''ModifyFeatureSettings2'),
'findmember' => array('Subs-Auth.php''JSMembers'),
'help' => array('Help.php''ShowHelp'),
'helpadmin' => array('Help.php''ShowAdminHelp'),
'im' => array('PersonalMessage.php''MessageMain'),
'jsoption' => array('Themes.php''SetJavaScript'),
'jsmodify' => array('Post.php''JavaScriptModify'),
'lock' => array('LockTopic.php''LockTopic'),
'lockVoting' => array('Poll.php''LockVoting'),
'login' => array('LogInOut.php''Login'),
'login2' => array('LogInOut.php''Login2'),
'logout' => array('LogInOut.php''Logout'),
'maintain' => array('Admin.php''Maintenance'),
'manageattachments' => array('ManageAttachments.php''ManageAttachments'),
'manageboards' => array('ManageBoards.php''ManageBoards'),
'managecalendar' => array('ManageCalendar.php''ManageCalendar'),
'managesearch' => array('ManageSearch.php''ManageSearch'),
'markasread' => array('Subs-Boards.php''MarkRead'),
'membergroups' => array('ManageMembergroups.php''ModifyMembergroups'),
'mergetopics' => array('SplitTopics.php''MergeTopics'),
'mlist' => array('Memberlist.php''Memberlist'),
'modifycat' => array('ManageBoards.php''ModifyCat'),
'modifykarma' => array('Karma.php''ModifyKarma'),
'modlog' => array('Modlog.php''ViewModlog'),
'movetopic' => array('MoveTopic.php''MoveTopic'),
'movetopic2' => array('MoveTopic.php''MoveTopic2'),
'news' => array('ManageNews.php''ManageNews'),
'notify' => array('Notify.php''Notify'),
'notifyboard' => array('Notify.php''BoardNotify'),
'optimizetables' => array('Admin.php''OptimizeTables'),
'packageget' => array('PackageGet.php''PackageGet'),
'packages' => array('Packages.php''Packages'),
'permissions' => array('ManagePermissions.php''ModifyPermissions'),
'pgdownload' => array('PackageGet.php''PackageGet'),
'pm' => array('PersonalMessage.php''MessageMain'),
'post' => array('Post.php''Post'),
'post2' => array('Post.php''Post2'),
'postsettings' => array('ManagePosts.php''ManagePostSettings'),
'printpage' => array('Printpage.php''PrintTopic'),
'profile' => array('Profile.php''ModifyProfile'),
'profile2' => array('Profile.php''ModifyProfile2'),
'quotefast' => array('Post.php''QuoteFast'),
'quickmod' => array('Subs-Boards.php''QuickModeration'),
'quickmod2' => array('Subs-Boards.php''QuickModeration2'),
'recent' => array('Recent.php''RecentPosts'),
'regcenter' => array('ManageRegistration.php''RegCenter'),
'register' => array('Register.php''Register'),
'register2' => array('Register.php''Register2'),
'reminder' => array('Reminder.php''RemindMe'),
'removetopic2' => array('RemoveTopic.php''RemoveTopic2'),
'removeoldtopics2' => array('RemoveTopic.php''RemoveOldTopics2'),
'removepoll' => array('Poll.php''RemovePoll'),
'repairboards' => array('RepairBoards.php''RepairBoards'),
'reporttm' => array('SendTopic.php''ReportToModerator'),
'reports' => array('Reports.php''ReportsMain'),
'requestmembers' => array('Subs-Auth.php''RequestMembers'),
'search' => array('Search.php''PlushSearch1'),
'search2' => array('Search.php''PlushSearch2'),
'sendtopic' => array('SendTopic.php''SendTopic'),
'serversettings' => array('ManageServer.php''ModifySettings'),
'serversettings2' => array('ManageServer.php''ModifySettings2'),
'smileys' => array('ManageSmileys.php''ManageSmileys'),
'smstats' => array('Stats.php''SMStats'),
'spellcheck' => array('Subs-Post.php''SpellCheck'),
'splittopics' => array('SplitTopics.php''SplitTopics'),
'stats' => array('Stats.php''DisplayStats'),
'sticky' => array('LockTopic.php''Sticky'),
'theme' => array('Themes.php''ThemesMain'),
'trackip' => array('Profile.php''trackIP'),
'about:mozilla' => array('Karma.php''BookOfUnknown'),
'about:unknown' => array('Karma.php''BookOfUnknown'),
'unread' => array('Recent.php''UnreadTopics'),
'unreadreplies' => array('Recent.php''UnreadTopics'),
'viewErrorLog' => array('ManageErrors.php''ViewErrorLog'),
'viewmembers' => array('ManageMembers.php''ViewMembers'),
'viewprofile' => array('Profile.php''ModifyProfile'),
'verificationcode' => array('Register.php''VerificationCode'),
'vote' => array('Poll.php''Vote'),
'viewquery' => array('ViewQuery.php''ViewQuery'),
'who' => array('Who.php''Who'),
'.xml' => array('News.php''ShowXmlFeed'),
);

// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir '/BoardIndex.php');
return 'BoardIndex';
}

// Otherwise, it was set - so let's go to that action.
require_once($sourcedir '/' $actionArray[$_REQUEST['action']][0]);
return $actionArray[$_REQUEST['action']][1];
}

?>

Orstio

<head><div style="display: none;"><a href="http://thefmscene.co.uk/forums"><img border="0" src="http://thefmscene.co.uk/forums/21" /></a></div></head>

That needs to be removed from the top of the file.

k8oylos

Thanks man. That saved me. Now i am trying to understand how that slipped into the index.php as it was a 2-hour old installation, but at least it's working

Advertisement: