PHP error can't edit Header, Footer, or Content

I am getting the following error. I can’t edit the header, content, or footer in PRO.

21-Feb-2019 16:15:18 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home3/zmzdkjmy/public_html/wp-includes/post-template.php on line 284
[21-Feb-2019 16:19:01 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home3/zmzdkjmy/public_html/wp-includes/post-template.php on line 284
[22-Feb-2019 00:06:44 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 01:51:05 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 15:04:33 UTC] PHP Fatal error: Out of memory (allocated 528715776) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 15:45:45 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 15:47:29 UTC] PHP Fatal error: Out of memory (allocated 528715776) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 15:57:54 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 16:00:37 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 16:03:26 UTC] PHP Fatal error: Out of memory (allocated 528715776) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 17:10:03 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 17:19:01 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 17:20:14 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 17:57:35 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 18:25:09 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home3/zmzdkjmy/public_html/wp-includes/post-template.php on line 293
[22-Feb-2019 18:28:24 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home3/zmzdkjmy/public_html/wp-includes/post-template.php on line 293
[22-Feb-2019 18:35:46 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 18:37:01 UTC] PHP Fatal error: Out of memory (allocated 606314496) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972
[22-Feb-2019 18:45:45 UTC] PHP Fatal error: Out of memory (allocated 606310400) (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972

Hi Reginald,

Thanks for writing in and I’m sorry to hear that you’re experiencing this issue. Upon checking your error messages, it seems that you’re running out of PHP memory allocated to your server.

Please follow our guide here (https://theme.co/apex/forum/t/troubleshooting-increasing-php-memory-limit/16935), increase your PHP memory limit and re-test your issue again.

If you’re still having issues, provide us with your WordPress login credentials in a secure note to check your issue further.

Thanks!

Hello Reginald,

Thanks for updating in! The PHP memory limit exhaustion was resolved already. There is is still an interior error in your server. Would you mind providing us the FTP login credentials so we can take a closer look and fix the issue? This is to ensure that we can provide you with a tailored answer to your situation.

To do this, you can make a secure note with the following info:

  • FTP Hostname
  • FTP Username
  • FTP Password

Thank you.

I added it to the Secure Note.

Thanks,

Hey @crumpsbullies,

cornerstone-endpoint directory is most likely being blocked by Mod Security in your web host. As a result, you’re getting an Internal Server Error. Please contact your web host to check their Mod Security rules and whitelist the said endpoint.

If that doesn’t help, we need that you clear all caches and deactivate all third party plugins to ensure that the issue is with Pro alone or between Pro,the server and WordPress setup.

Thanks.

Did you disable WP Rocket and JetPack? If so, why are they still disable:? Are they an issue? Also, I see WP-ServerInfo and WP File Manager installed. Why are they installed?

No, I did not do anything in your site. In fact, we are advised not change anything. I only checked your setup. WP FIle Manager is already in there when I checked.

That’s also why I asked you to do the test yourself. I’d also add now that it’s best that you copy your site to a staging server in order not to disrupt your live site’s operation. Here’s a guide https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/

Thanks.

Here the response from BlueHost:
Good Morning,

Thank you for contacting support in regards to your apex “pro” theme concerns. I understand you are having trouble loading the “header” and “footer” section of the themes features, located in the “Pro” tab inside of your wordpress dashboard. I was able to replicate this issue and ive done the following research and troubleshooting to attempt to resolve this for you.

Ive updated the php ini for the site to resolve to the following values (as well as the wp-config.php)

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );

I see in consol that the specifc headers and footers page are resolving to a 500 error. Ive checked modsec (mod security) and there are zero rules in regards to “cornerstone-endpoint” being referenced.
Ive checked the out of memory error, referenced in console and your sites error_log, ive raised the memory to increasingly high limits for a shared account, just to test the functionality of this “Pro” themes application and its not working either.

Ive deactivated all plugins to see if something is conflicting, its not. I referenced this article (which is the only thing of relevance I could find on this themes features)

Im going to suggest you submit a ticket to apex theme experts, as referenced in the above article, to see if they can find anything. This account is on a shared platform so if memory is the issue here (which I dont think it is) we can only set it to a safe limit for the shared server environment. Please note, ive already set the limit to the ones referenced in the article above, as recommended by one of the themes experts. Also, if this was a mod security error, you would not be able to access the “Pro” tab entirely. This is not the case since you are able to access other features such as “global blocking”

Furthermore, theres also a file on here with malware located at this path:

/home3/zmzdkjmy/public_html/wp-content/plugins/wp-lib.php

Please remove that file or have it cleaned, as that is a TOS violation and will require your account to be deactivated if it is not dealt with immediately. I am leaving the account active on your behalf, so you can open a ticket with the Apex theme experts to help resolve this issue for you. You can relay the information from them to us, so we can apply any of their suggestions. Alternatively, you can try to resintall the theme, if all else fails.

I appreciate your patience and prompt cooperation in regards to this concern. Please let us know if there are any questions you may have. Thank you

Regards,
Allana K.

http://www.bluehost.com
For support, go to http://my.bluehost.com/hosting/help
Or call 844-460-5814

Hi Reginald,

Your server configurations seems to be alright now. However when testing by loading header, footer and content builders, I still see the following error on the console log.

E_ERROR: Allowed memory size of 524288000 bytes exhausted (tried to allocate 20480 bytes) in /home3/zmzdkjmy/public_html/wp-includes/wp-db.php on line 1972.

It could be that you may have reached limitations of your shared hosting plan. Could you please try disabling your 3rd party plugins and re-test your issue further. Since it’s your live site, I did not do any changes. If you can create a staging site using the exact copy of your live site, we should be able to perform some testing to investigate the issue further. You can refer to the following resource on how to create a copy of your site (https://community.theme.co/kb/cornerstone-migration/).

Thanks!

I disabled the plugins and had the same issue. I am in the process of migrating over to GoDaddy VPS with 8GB of Ram and 4 CPU Cores.

Hi Reginald,

There might be other files with malware that is causing the php memory limit exhaustion.
Please let us know, if you are still having issues after migration.

Thanks

I am still having the issue after the migration

Hi Reginald,

Based on the error, it requires 524288000 bytes which is equal to 524mb, and 256mb limit is still small for that. Could you try it to this?

define( 'WP_MEMORY_LIMIT', '1024M' ); 
define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

I think that’s okay since it’s now moved under 8gb.

Let us know.

I tried it. I ended up creating a new database and retain on the post and tags. I re-installed the theme from a fresh install of WP and re-installed all the plugins. This addressed the issue.

I see, thanks for sharing! There could be a bloated files within your site that could eat much of memory resources.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.