MyBB Community Forums

Full Version: Admin Settings On Save = White Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a friend who came to me with an issue they have been having for some time now, roughly at least the last several months that they know of as settings aren't often changed. This occurred randomly and as far as they are aware no changes were made previous to this happening.

Issue:
When you click save for any Configuration settings it leads to an error 500 (this page isn't working). This happens on all setting pages when clicking save.

Errors:
  • cPanel error logs don't show anything about a 500 error which is extremely weird, like the error literally does not exist in the log.
  • Error log file does not show anything related to this either (? that I can tell) however it does have these:
    <error>
     <script>inc/functions.php</script>
     <line>8598</line>
     <type>2</type>
     <friendly_type>Warning</friendly_type>
     <message>preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0</message>
     <back_trace>#0  errorHandler->error() called at [[PHP]: ]
    #1  preg_match() called at [/inc/functions.php:8598]
    #2  validate_utf8_string() called at [/inc/db_mysqli.php:1000]
    #3  DB_MySQLi->escape_string() called at [/inc/class_session.php:65]
    #4  session->init() called at [/xmlhttp.php:51]
    </back_trace>
    </error>
    
    <error>
     <script>inc/functions.php</script>
     <line>8598</line>
     <type>2</type>
     <friendly_type>Warning</friendly_type>
     <message>preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0</message>
     <back_trace>#0  errorHandler->error() called at [[PHP]: ]
    #1  preg_match() called at [/inc/functions.php:8598]
    #2  validate_utf8_string() called at [/inc/db_mysqli.php:1000]
    #3  DB_MySQLi->escape_string() called at [/inc/class_session.php:65]
    #4  session->init() called at [/xmlhttp.php:51]
    </back_trace>
    </error>
    
    <error>
     <script>inc/functions.php</script>
     <line>4820</line>
     <type>2</type>
     <friendly_type>Warning</friendly_type>
     <message>Cannot modify header information - headers already sent by (output started at /home/commentedoutforprivacy/commentedoutforprivacy.com/inc/class_error.php:215)</message>
     <back_trace>#0  errorHandler->error() called at [[PHP]: ]
    #1  header() called at [/inc/functions.php:4820]
    #2  send_page_headers() called at [/global.php:37]
    #3  require_once() called at [/forumdisplay.php:24]
    </back_trace>
    </error>
    
    <error>
     <script>inc/functions.php</script>
     <line>2063</line>
     <type>2</type>
     <friendly_type>Warning</friendly_type>
     <message>Cannot modify header information - headers already sent by (output started at /home/commentedoutforprivacy/commentedoutforprivacy.com/inc/class_error.php:215)</message>
     <back_trace>#0  errorHandler->error() called at [[PHP]: ]
    #1  header() called at [/inc/functions.php:2063]
    #2  my_setcookie() called at [/inc/class_session.php:380]
    #3  session->load_guest() called at [/inc/class_session.php:113]
    #4  session->init() called at [/global.php:49]
    #5  require_once() called at [/forumdisplay.php:24]
    </back_trace>
    </error>

MyBB: 1.8.30
PHP: 7.4.33
SQL Engine: MySQLi 10.5.15

If you have any ideas as where to start to get this solved please don't hold back lol.
That's something that would need to be raised to the host.

Quote:Either grant PHP permission to allocate executable memory, or set pcre.jit=0

pcre.jit would be a php.ini setting, or the host would need to allow allocating executable memory.

Not sure it's related to the settings issue tho as it's from xmlhttp.php. Without an error log of what's causing the 500 it'll be impossible to know what's causing it, will need to ask the host why there isn't a log, or where it is if there is one, as the causes of 500 errors should be logged.
(2022-11-14, 12:19 PM)Matt Wrote: [ -> ]as the causes of 500 errors should be logged.

Yeah, this is why I'm super confused lol. I've never stumbled across an error that wasn't logged. I will let them know they need to talk to the host about both issues.
add this to your PHP.ini

pcre.jit=0
Jumping back in here with what we did to fix the issue.

I probably should have checked this first but I didn't. Did a file verification check and it turns out a good majority of their core files had been tampered with by someone (they're assuming the theme designer they hired and gave access to files).

They were using 1.8.30 so I downloaded the files from the previous version. Had them reuploaded the majority of them (overwriting the files they had making sure all tampered files were brought back to defaults).

Then we were able to use ACP settings (save without blank white page or error page). So closed the board and upgraded them to 1.8.31.

Everything is working fine now.