Migration to new server - problem with PHP 7

BassMan

Well-known member
Hi,

I'm trying to migrate to another server, but when I enable PHP 7.2 on that server the forums stop working. When I try to visit forum it says "<my forum> is currently unable to handle this request." or "HTTP ERROR 500 ". Once I've also seen this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2799545272 bytes) in /home/.../public_html/.../src/XF/Db/Mysqli/Statement.php on line 84


On the previous server, all my sites worked just fine on PHP 7.2. Now my host thinks it's all ok on their side, but I'm not sure why things are not working as they should.

Another thing, is it possible to have something to do with this when a database was moved to a new server: https://xenforo.com/community/threads/public-service-announcement-check-your-mysql-backup.152740/ ? My host did a migration...

I just can not locate the problem with PHP 7.2...

Some help, directions or idea would be helpful.

Thank you.
 
Edit your php.ini file and in there edit memory_limit to your desire value.
More than 128MB what it is now.
 
128 MB is the default memory limit and should be sufficient unless you are processing really large image uploads.

Although increasing memory_limit might "fix" the issue, I'd suggest to investigate why so much memory is needed as an average XF 2 page should require way less.
 
I have 128MB memory. This is happening only with PHP 7.2 enabled on new server, on old one all works fine. How can I investigate this?
 
And memory_limit was the same on the old server?

At first I'd try to disable all Add-ons by placing
PHP:
$config['enableListeners'] = false;
in config.php

If this does work disable all Add-ons through the admin backend, remove the config.php setting, re-anable them one by one and test again after each one.
 
Back
Top Bottom