Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: FATAL ERROR: CSM not working after server move, php 5 to 7. 500 Sever errors and memory limits.

Status Resolved
Add-on / Version Custom System Messages 3.0.5
Severity
EE Version 3.5.16

Jessica Dooley

Jul 13, 2018

Description (please refer to email sent for additional details and credentials):

I’m moving a site from a Nexcess server on php 5.6.34 to a Google Cloud server on php 7.2. I have had the SysAdmin look into the errors, and they say that it is the addon causing the issues.

Everything else is working just fine, as it is on Nexcess, except for when CSM is installed. On all form processes (at least what I’m running into), I’m getting a 500 error. I do not get these errors with CSM uninstalled.


Additional info:

There are no ssl redirects in .htaccess for ssl, the code of the site is redirecting if SSL is not used.
Sessions are being written to /var/lib/php/session, and there are session files in there with todays’s date.

Example fatal error in the logs from today:

[Fri Jul 13 11:32:19.294160 2018] [php7:error] [pid 7678] [client 173.14.20.85:48335] PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 20480 bytes) in /sites/[mydomain.com]/htdocs/system/ee/EllisLab/ExpressionEngine/Service/Database/Log.php on line 149, referer: https://www.[mydomain.com]/patient-account/settings/updated

The issue seems to happen mostly on form error, but sometimes on success as well.

Example of error on successful logout:

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 266240 bytes) in /sites/[mydomain.com]/htdocs/system/ee/EllisLab/ExpressionEngine/Service/Database/Log.php on line 149 E_ERROR Error in file Log.php at line 149: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 266240 bytes) Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 462848 bytes) in Unknown on line 0

Detailed steps to reproduce the issue:

1. Update your hosts file to see the development site on the Google Cloud server

[IP PROVIDED IN EMAIL] [mydomain.com]
[IP PROVIDED IN EMAIL] www.[mydomain.com]
(https://www.[mydomain.com]/phpinfoo.php - should show “PHP Version 7.2.7” to verify you are accessing the correct version, the old sever is on php 5.6.34)
You can also access the server info here: http://cloud.[mydomain.com]/phpinfoo.php - without changing your hosts file.

2. Log into the admin

3. Try to change your password in the account settings, and use the wrong password to produce an error:

Account Settings Page:
http://www.[mydomain.com]/patient-account/settings

You should see something like this:

Deprecated

The each() function is deprecated. This message will be suppressed on further calls

ee/EllisLab/ExpressionEngine/Library/Security/XSS.php, line 123 show details

Severity: E_DEPRECATED
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 266240 bytes) in /sites/[mydomain.com]/htdocs/system/ee/EllisLab/ExpressionEngine/Service/Database/Log.php on line 149 E_ERROR Error in file Log.php at line 149: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 266240 bytes) Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 462848 bytes) in Unknown on line 0


I also found I’m also getting a white screen on admin errors.  For example, if I’m logged in as user that does NOT have admin access, I get a blank template. I’ve turned on advanced error reporting.

You can test this by logging in as a customer [Customer account details sent in email]

And then try to access the admin:
https://www.[mydomain.com]/admin.php


Here is what is in my message template:

{layout="_layouts/default" class="messages general-page"}

			<div class="main-content" id="skip-to-content">
				<div class="container" role="main">
				    
				    <div class="account-wrapper">
	
					{!-- To deliver a custom message for a specific action --} 
						
					{if csm:error == TRUE}
				    
				    <h2>{exp:transcribe:replace name='error_encountered'}:</h2><div class="message alert">{csm:content}</div><p class="developer-content">{csm:action}</p><p class="links-wrapper">{csm:link}</p>
<p>					<br />
					{/if}<br />
				    <br />
				    </p>
</div><p><!-- [END] account-wrapper --><br />
				    <br /></p>
</div></div>


Any idea what could be going on here?  Let me know if you need any additional info?

#1

Jessica Dooley

Comment has been marked private.

#2

BoldMinded (Brian)

There shouldn’t be any issues with CSM and PHP 7, so I’m guessing this is an environmental issue. Have you tried to create a new blank EE site with just CSM installed and a basic login form on the same server to see if you can replicate it? If not, then it means its something specific with your site, not the server, then we can look a the site itself.

#3

BoldMinded (Brian)

Have you tried increasing PHP’s memory allocation? After looking at this ticket again, none of the errors are actually coming from a CSM file.

#4

Jessica Dooley

We had increased the memory limit 4x, tried a slew of other things, the clean install etc. It actually turned out to be this bug in EE:

https://expressionengine.com/support/bugs/23583/pages-intermittently-fail-to-load-after-3.5.16-update

#5

Jessica Dooley

Comment has been marked private.

#6

BoldMinded (Brian)

Strange, but glad you got to the bottom of it!

Login to reply