Jump to content

PHP Fatal error always in same line


Carmelina

Recommended Posts

I am having issues with my website getting errors occasionally (not consistent, every 4th page or so). When I check the error log I get the following message:

[04-Jun-2020 14:57:22 UTC] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/sitename/public_html/wp-includes/meta.php on line 964

99% of the time it is line 964, rarely it is line 960. I really dont think this has to do with memory size as our memory is set to 512M, I thought it might have been an issues with W3 total cache, but deactivating the plugin didn't seem to have any affect.

Here is the meta.php code from line 949-964.

if ( ! empty( $meta_list ) ) {
		foreach ( $meta_list as $metarow ) {
			$mpid = intval( $metarow[ $column ] );
			$mkey = $metarow['meta_key'];
			$mval = $metarow['meta_value'];

			// Force subkeys to be array type.
			if ( ! isset( $cache[ $mpid ] ) || ! is_array( $cache[ $mpid ] ) ) {
				$cache[ $mpid ] = array();
			}
			if ( ! isset( $cache[ $mpid ][ $mkey ] ) || ! is_array( $cache[ $mpid ][ $mkey ] ) ) {
				$cache[ $mpid ][ $mkey ] = array();
			}

			// Add a value to the current pid/key.
			$cache[ $mpid ][ $mkey ][] = $mval;

I am fairly new to this so any help is really appreciated as I am just trying to help fix my family's business website

 

Thanks!

Link to comment
Share on other sites

  • Carmelina changed the title to PHP Fatal error always in same line
23 minutes ago, Carmelina said:

as our memory is set to 512M

No it isn't.  It's set to 128MB according to your error message.

23 minutes ago, Carmelina said:

 Allowed memory size of 134217728 bytes exhausted

134217728 bytes = 128MB

Make sure you're editing the correct php.ini file, use phpinfo() to find it if necessary.

Link to comment
Share on other sites

1 minute ago, kicken said:

No it isn't.  It's set to 128MB according to your error message.

134217728 bytes = 128MB

Make sure you're editing the correct php.ini file, use phpinfo() to find it if necessary.

You're right, I just noticed after posting I was looking in the wrong folder and there is no php.ini for the correct/live version of my website. I have a dedicated server with host gator but even in WHM I cant find the PHP Configuration Editor that I am supposed to have access to. Im and on hold with support, hopefully I can get the memory limit raised.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.