This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Simple Machine Forum - Blank Screen on Load / Switching Pages
#39
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
(09-24-2015, 12:43 AM)MarkDark Wrote: Hi!
Everyone who appears when you run Simple Machine Forum white page, see this post!

Problem:
You tried installing Simple Machines Forum software (SMF) either from the source website or using Sentastico, but it shows as a blank page when you try to access it. No issues are seen in the ZpanelX or Sentora Error Log and all other configurations appear to be correct.

Solution :
This issue is caused by suhosin security module which blocks the PHP function shell_exec() from being used. However, SMF appears to call this function in the Sources/Subs.php file, around line 3538:

// Try the Linux host command, perhaps?

if (!isset($host) && (strpos(strtolower(PHP_OS), ‘win’) === false || strpos(strtolower(PHP_OS), ‘darwin’) !== false) && mt_rand(0, 1) == 1)
{
if (!isset($modSettings[‘host_to_dis’]))
$test = @shell_exec(‘host -W 1 ‘ . @escapeshellarg($ip));
else
$test = @shell_exec(‘host ‘ . @escapeshellarg($ip));
// Did host say it didn’t find anything?
if (strpos($test, ‘not found’) !== false)
$host = ”;
// Invalid server option?
elseif ((strpos($test, ‘invalid option’) || strpos($test, ‘Invalid query name 1′)) && !isset($modSettings[‘host_to_dis’]))
updateSettings(array(‘host_to_dis’ => 1));
// Maybe it found something, after all?
elseif (preg_match(‘~\s([^\s]+?)\.\s~’, $test, $match) == 1)
$host = $match[1];
}

This code block should be commented out by adding PHP comment tags :

// Try the Linux host command, perhaps?

/* if (!isset($host) && (strpos(strtolower(PHP_OS), ‘win’) === false || strpos(strtolower(PHP_OS), ‘darwin’) !== false) && mt_rand(0, 1) == 1)
{
if (!isset($modSettings[‘host_to_dis’]))
$test = @shell_exec(‘host -W 1 ‘ . @escapeshellarg($ip));
else
$test = @shell_exec(‘host ‘ . @escapeshellarg($ip));
// Did host say it didn’t find anything?
if (strpos($test, ‘not found’) !== false)
$host = ”;
// Invalid server option?
elseif ((strpos($test, ‘invalid option’) || strpos($test, ‘Invalid query name 1′)) && !isset($modSettings[‘host_to_dis’]))
updateSettings(array(‘host_to_dis’ => 1));
// Maybe it found something, after all?
elseif (preg_match(‘~\s([^\s]+?)\.\s~’, $test, $match) == 1)
$host = $match[1];
} */

This will fix the issue and allow SMF to work properly. The function is not necessary for the normal operation of the script, as other means are available to SMF to accomplish the same thing.

Source: http://www.supportpro.com/blog/2013/09/s...t-working/

don't see this on my version (2.0.11). I have:

echo preg_replace('~</body>\s*</html>~', '', $temp), '
<div class="smalltext" style="text-align: left; margin: 1ex;">
', $txt['debug_templates'], count($context['debug']['templates']), ': <em>', implode('</em>, <em>', $context['debug']['templates']), '</em>.<br />
', $txt['debug_subtemplates'], count($context['debug']['sub_templates']), ': <em>', implode('</em>, <em>', $context['debug']['sub_templates']), '</em>.<br />
', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br />
', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br />
', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br />';

if (!empty($modSettings['cache_enable']) && !empty($cache_hits))
{
$entries = array();
$total_t = 0;
$total_s = 0;
foreach ($cache_hits as $cache_hit)
{
$entries[] = $cache_hit['d'] . ' ' . $cache_hit['k'] . ': ' . sprintf($txt['debug_cache_seconds_bytes'], comma_format($cache_hit['t'], 5), $cache_hit['s']);
$total_t += $cache_hit['t'];
$total_s += $cache_hit['s'];
}
Reply
Thanks given by:


Messages In This Thread
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages - by ThyRaven - 09-24-2015, 04:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Parking pages not displaying correctly woose 4 6 ,443 10-18-2021, 11:14 AM
Last Post: TGates
The website don't load naire 1 5 ,129 10-15-2019, 11:48 PM
Last Post: jamesmango
to clone 'sentora' installation to another machine gabriel15959 4 9 ,069 06-19-2019, 06:02 AM
Last Post: Me.B

Forum Jump:


Users browsing this thread: 17 Guest(s)