Skip Navigation

[Resolved] PHP 7 Only Error When Activating Both Types and Views Plugins

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 3 voices.

Last updated by jeremyV-2 7 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#403167

When I switch to PHP7 I get the following error when visiting an admin page:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 21474836512 bytes) in /home/mjtwebsi/public_html/hamstragroup/wp-content/plugins/types/library/toolset/autoloader/autoloader.php on line 198

Viewing the website works fine on php7 but when trying to access the dashboard I get those errors. If I disable both Types and Views and then switch to PHP7 WordPress works correctly. I can then enable either Types or Views and WordPress works without errors, but as soon as I enable the other I get the error again.

I couldn't find the debug info to submit my debug info but here are the versions and info I thought you might need:
Types: Version 2.0.1
Views: Version 2.0
Wordpress: 4.5.2
WP Memory Limit: 256MB

#403243

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Regarding the Debug information:
https://toolset.com/faq/provide-debug-information-faster-support/

Regarding the issue you are facing - It may happen that when you are using site server resources are not that much occupied but when your coworker using it does.

Could you please try to raise memory limit and try to resolve your issue. Could you please try to add following code to wp-config.php file.

define('WP_MAX_MEMORY_LIMIT', '512M');
define('WP_MEMORY_LIMIT', '256M');
#403384

I added the code you suggested and have a similar error still when going to the WordPress dashboard:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 47345346550912 bytes) in /home/mjtwebsi/public_html/hamstragroup/wp-includes/plugin.php on line 928

Then when I tried to go to the dashboard again I got a "500 - Internal Server Error" ... when I switch back to PHP 5.6.22 it works fine again.

#403404

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I need to check on your install whats causing the issue.

Please share problem URL.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#403673

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've activated WP_DEUG from wp-config.php file and added following code to it:

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Now - could you please switch to PHP 7 so I can check error logs and able to debug issue further.

#403778

I switched to php 7. Thank you.

#403832

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked "error_log" file at path:
=> /wp-content/error_log

I can see that its displaying errors that many modules are not loaded. Could you please address those first?

[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: http: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: mailparse: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: OAuth: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: oci8: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0
[26-May-2016 09:12:51 America/Denver] PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0

Also, Could you please pass me information how you used to upgrade/downgrade PHP?

#403853

I'll ask my host, Siteground, about those modules. I'm simply using 1H Software's PHP Version Manager in cPanel. It was included in my hosting at Siteground.

When I open up the PHP Version Manager I can choose a folder/site and change the PHP Version to whichever one I want and it configures it for me.

Thanks.

#403861

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - Please, because it really looks like the issue from the server. Could you please contact your hosting authority and ask them to crosscheck this issue. I'm sure that they will find something.

#403965

I talked with my hosting provider. They are pointing the finger at the theme it seems. I mostly agree with them... even though the theme developers say it is fully compatible with PH7. I have no problems with PHP7 with my other websites so I guess I'll just stick with an older version of PHP. Thanks for your help.

#551269

The Siteground staff made the following change to php.ini, which fixed the problem for me and allowed me to activate both plugins without the memory leak.

opcache.interned_strings_buffer=12
opcache.memory_consumption = 256
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.