Posts: 25
Threads: 1
Joined: May 2015
Reputation:
0
Sex: Male
Thanks: 1
Given 0 thank(s) in 0 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-23-2015, 06:28 AM
(09-23-2015, 05:18 AM)kandrews Wrote: Better versions of PHP / Apache + TLS 1.2 support and systemctl for CentOS 7 to name a few
Which would be better - CentOS 7 or Ubuntu 14?
Posts: 188
Threads: 7
Joined: Jul 2014
Reputation:
4
Sex: Male
Thanks: 2
Given 53 thank(s) in 30 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-23-2015, 07:28 AM
I personally like CentOS over Ubuntu and ArchLinux over both of them... its really down to personal preference CentOS 6/7 do have the software collections libraries by RedHat for more up-to-date packages : https://www.softwarecollections.org however i'm sure ubuntu has something similar...
Posts: 25
Threads: 1
Joined: May 2015
Reputation:
0
Sex: Male
Thanks: 1
Given 0 thank(s) in 0 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-23-2015, 07:38 AM
I've used CentOS for years for web hosting but I do run Zimbra on Ubuntu. Would like to consolidate to one distro but you just never can lol
Posts: 25
Threads: 1
Joined: May 2015
Reputation:
0
Sex: Male
Thanks: 1
Given 0 thank(s) in 0 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-23-2015, 11:57 AM
Updated my 2nd name server to CentOS 7 and already getting:
Last failed login: Wed Sep 23 01:57:13 UTC 2015 from 43.229.53.62 on ssh:notty
There were 39 failed login attempts since the last successful login.
Last login: Wed Sep 23 01:55:40 2015
that doesn't sound good. Any ideas why and how to stop it?
Posts: 25
Threads: 1
Joined: May 2015
Reputation:
0
Sex: Male
Thanks: 1
Given 0 thank(s) in 0 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-23-2015, 12:00 PM
Sentora installer still installs Version 1.0.0. Will it automatically pick up info and install 1.0.3 or is there something I need to do?
Posts: 202
Threads: 13
Joined: Oct 2014
Reputation:
13
Sex: Male
Thanks: 3
Given 51 thank(s) in 40 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-24-2015, 12:43 AM
(This post was last modified: 09-24-2015, 06:44 AM by MarkDark.
Edit Reason: Check versions
)
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 3737: (for version 2.0.11)
// 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/
Posts: 3 ,662
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-24-2015, 01:46 AM
That would do it MarkDark! Nice find buddy
-TGates - Project Council
SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE
Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Posts: 188
Threads: 7
Joined: Jul 2014
Reputation:
4
Sex: Male
Thanks: 2
Given 53 thank(s) in 30 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-24-2015, 01:53 AM
This should have been logging php errors into the domain's error log.... need to have a look at why errors aren't being logged by blocked functions.
MarkDark, well done, very good find!
Posts: 25
Threads: 1
Joined: May 2015
Reputation:
0
Sex: Male
Thanks: 1
Given 0 thank(s) in 0 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-24-2015, 04:13 AM
(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'];
}
Posts: 25
Threads: 1
Joined: May 2015
Reputation:
0
Sex: Male
Thanks: 1
Given 0 thank(s) in 0 post(s)
RE: Simple Machine Forum - Blank Screen on Load / Switching Pages
09-24-2015, 04:15 AM
(09-24-2015, 04:13 AM)ThyRaven Wrote: (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'];
}
Found it! Starts on line 3737 now. But thanks for the fix!
|