Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: tarantula901 on May 12, 2020, 06:49:17 PM

Title: White screen error in update 2.0.16
Post by: tarantula901 on May 12, 2020, 06:49:17 PM
When I update the site 2.0.16, I get a white screen error on my homepage. I use simpleportal as a portal. As for the portal's homepage, it's okay, and when I try to enter the forum, I get a white page error. what is the reason of this. when i got this error i tested all php versions from cpanel but the problem was not fixed.
Title: Re: White screen error in update 2.0.16
Post by: SpacePhoenix on May 12, 2020, 06:59:28 PM
Any errors listed in PHP's error log?
Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on May 12, 2020, 07:04:48 PM
Quote from: SpacePhoenix on May 12, 2020, 06:59:28 PM
Any errors listed in PHP's error log?

I couldn't find a solution because there was no error message.

Currently smf version 2.0.15

MySQL v: 5.6.41-84.1-log
PHP: 5.6.40

I couldn't solve the reason somehow, which code do you think is creating this problem
Title: Re: White screen error in update 2.0.16
Post by: Kindred on May 13, 2020, 09:42:39 AM
without more information, we really can't provide even a guess.

and, if it is generating a white page -- then there really should be a SERVER error log. The White screen indicates a php system crash.

if there is no error.log or errorlog. or an error log in your SERVER Cpanel, then talk to your host about why the server is not logging critical failures.
Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on May 15, 2020, 10:02:10 PM
When updating, the white screen comes up, the problem is related to the update, but I can not understand what the reason is, because there is no error message etc, so I opened this topic.
Title: Re: White screen error in update 2.0.16
Post by: Sir Osis of Liver on May 15, 2020, 10:14:28 PM
Can you locate the server error log?  Should be in your forum root.  You may also be able to view server errors in cpanel.  Look in cPanel -> Metrics -> Errors.
Title: Re: White screen error in update 2.0.16
Post by: Kindred on May 16, 2020, 08:33:08 PM
Quote from: Kindred on May 13, 2020, 09:42:39 AM
without more information, we really can't provide even a guess.

and, if it is generating a white page -- then there really should be a SERVER error log. The White screen indicates a php system crash.

if there is no error.log or errorlog. or an error log in your SERVER Cpanel, then talk to your host about why the server is not logging critical failures.
Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on June 05, 2020, 10:23:58 AM
It might be for hosting at first

The problem was not caused by hosting.

I tested the hosting php versions, the white screen error continued the same.

I entered the subject as admin, there was no white screen error.

I entered the same subject as a visitor gave white screen error.

The problem is I only get the white screen error when I enter the subject as a visitor.

I get a white screen error on some issues, not all issues

There is no problem with log files, I can't find a complete solution for this

How do you think I can find the answer to this problem, what do I think?



Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on June 05, 2020, 11:11:24 AM
İsmi Azam duası ile ilgili İsmi Azam duası nasıl yapılır, İsmi Azam Duası faziletleri, Arapça, Türkçe yazılışı ve anlamı (meali)

İ


I get a white screen error when the post on my site is on my site
Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on June 05, 2020, 12:49:23 PM
I solved the problem.

The problem disappears when you remove the following code in subs.php.

No matter how I make changes to the code below, my problem disappears.

Or what exactly is the function of this code.

Would this be a security problem or a problem without the code?

Subs.php

ob_start(function ($buffer) {
global $context;
if (!$context['user']['is_guest'])
return $buffer;

return preg_replace_callback('~(<form[^<]+action=login2(.+))</form>~iUs' . (!empty($context['utf8']) ? 'u' : ''), function($m) use ($context) {
$repl = '';

if (strpos($m[0], $context['session_var']) === false)
$repl .= '<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"/>';

return $m[1] . $repl . '</form>';
}, $buffer);
});
Title: Re: White screen error in update 2.0.16
Post by: Arantor on June 05, 2020, 12:57:32 PM
So this is part of 2.0.16 and means that login actually works. If you remove it, there's a better than average chance login will stop working.

However, I don't see why this would be a problem given that this works fine on other SMF installations, and without an error log entry to explain why, I don't know what to tell you.

What I can tell you is that I'm the author of that piece of code... and it's been fine ever since I wrote it. If you installed the 2.0.14 Login Fix mod, you should remove that since it's the same thing as was implemented into 2.0.16.
Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on June 05, 2020, 01:24:42 PM
Login to the site from Login.template.php file.

Is the purpose of the code I removed add the following code?

If so, I have no problem logging in

<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />

There is no problem in a zero smf.

There may be a conflict with a mod causing this problem.

Thanks for your message.



Title: Re: White screen error in update 2.0.16
Post by: Wellwisher on June 05, 2020, 02:06:54 PM
I had the same issue as the OP with 2.0.16!

I run the updates through my localhost and troubleshooted errors first. This way, I already have the files that require manual "finding and replacing" and I know for a fact they are in working order.  I then put the live site in maintenance mode, install the mod, and upload the fixed files to my live site.

Strangely enough doe, on this occasion, the localhost update went 'Well' only a handful of files required finding and replace. However, once I'd FTP'd the fixed files, I got the "white screen of death".  :-\

Luckily, I saw this post describing the same issue. In particular a problem with "subs.php", so I decided to re-upload that file again and *maliciously*, it started breathing again!

These were the files I had to fix clerically using "find and replace" instructions:

   .\Sources/Profile-Modify.php
   .\Sources/QueryString.php
   .\Sources/Subs.php
   .\Themes\default/Login.template.php
   .\Themes\default/Register.template.php
Title: Re: White screen error in update 2.0.16
Post by: tarantula901 on June 05, 2020, 03:30:26 PM
 :. \ Sources / Profile-Modify.php
   . \ Sources / QueryString.php
   . \ Sources / Subs.php
   . \ Themes \ default / Login.template. php
   . \ Temalar \ varsayılan / Register.template.php

Did you solve the problem by removing the codes that are in the scope of 2 0 16 because you stated the problem.

It may be in people who do not notice this problem.

There is a different solution to this.
Title: Re: White screen error in update 2.0.16
Post by: Arantor on June 05, 2020, 03:41:25 PM
The fix that you've decided is a problem is working for many people, but you don't seem to want to find out why it's broken and fix properly.
Title: Re: White screen error in update 2.0.16
Post by: Wellwisher on June 05, 2020, 05:19:17 PM
@tarantula901 I never removed any code.  I just followed the mod's instructions *very carefully* and implemented the changes it wanted to make to the forum files. However my live forum still failed! So I just I re-uploaded subs.php (just to see if it might be my FTP program or web-host which could be the issue) and sure enough, it started working. This tells me, there may have been some sort of file corruption which broke the forum. Re-uploading the file sorted the issue.

Maybe go back to how your forum was originally when it first "white screened". Then double-check the 2.0.16 mod file modifications. If they are correct, try re-uploading any files which you might had to edit to get the mod working (i have listed some files i had to edit to get the mod working).

If all else fails, work backwards:

- Install a fresh copy of your forum on localhost and update the forum fully using the SMF default theme (with no mods). Then start adding your custom theme, mods all back again etc until you see something breaking.


Also guys, I can confirm, there was no error log. This was the first thing I tried to look for when the issue occurred.

Title: Re: White screen error in update 2.0.16
Post by: Arantor on June 05, 2020, 05:35:38 PM
If you have no error log, neither in the SMF's own log or the server, ask your host, because having actual logs enabled is useful.
Title: Re: White screen error in update 2.0.16
Post by: Wellwisher on June 05, 2020, 05:41:45 PM
Quote from: Arantor on June 05, 2020, 05:35:38 PM
If you have no error log, neither in the SMF's own log or the server, ask your host, because having actual logs enabled is useful.

Hey Arantor,

Will do. I was trying to look for the SMF version of error log. From what I know, this would be in the root of the smf foum correct?
Title: Re: White screen error in update 2.0.16
Post by: Arantor on June 05, 2020, 05:44:07 PM
The SMF version is the one in the admin panel; lives in the database normally - the log_errors table.

Other than that, ask your host where they put it.