0

I got Fatal error:

Out of memory (allocated 31981568) (tried to allocate 32776 bytes) in
/homepages/2/d213994292/htdocs/pub_site/wordpress/wp-includes/formatting.php
on line 856

How do I solve it?

Mariano
  • 6,423
  • 4
  • 31
  • 47
  • 1
    see that http://stackoverflow.com/questions/6314733/php-fatal-error-out-of-memory-allocated-80740352-tried-to-allocate-12352-byt, https://wordpress.org/support/topic/fatal-error-out-of-memory-allocated-62652416-tried-to-allocate-6571071-bytes – Niranjan N Raju Oct 10 '15 at 05:51
  • Actually I didn't found php.ini file in my wordpress folder on server. –  Oct 10 '15 at 06:03
  • you can add in your file , i think ur trying to upload files rite?? – Niranjan N Raju Oct 10 '15 at 06:04
  • No i m not uploading file. I want to open my home page. And I got Fatal error: Out of memory (allocated 31981568) (tried to allocate 32776 bytes) in /homepages/2/d213994292/htdocs/pub_site/wordpress/wp-includes/formatting.php on line 856 error –  Oct 10 '15 at 06:05
  • is ur home page that big that memory allocation is failing?? – Niranjan N Raju Oct 10 '15 at 06:06
  • ya exactly. what i do to solve these error? please help me. –  Oct 10 '15 at 06:08
  • add this in that file and check, `define('WP_MEMORY_LIMIT', '128M');` – Niranjan N Raju Oct 10 '15 at 06:09
  • I already try this code in my config file. but not working. I host my web on 1 & 1. I think in that some setting is required. but i dont know what i do. so please u have any idea then tell me. thanks –  Oct 10 '15 at 06:16
  • `ini_set('memory_limit', "256M");`, this line?? – Niranjan N Raju Oct 10 '15 at 06:18
  • No i didnt found this line. in which file i add this code?? –  Oct 10 '15 at 06:23
  • add this line in your file and check if ur getting the error. – Niranjan N Raju Oct 10 '15 at 06:24
  • I checked it in my config file as well as formatting.php file. but still i got these error. –  Oct 10 '15 at 06:41
  • if its not there, paste the code, and check if you r getting error. – Niranjan N Raju Oct 10 '15 at 06:42
  • I add these code and also check it. but getting same error. –  Oct 10 '15 at 06:44
  • If any plugin is there to solve these error please tell me. –  Oct 10 '15 at 06:45
  • im not wordpress developer, im php developer. just change and check once, – Niranjan N Raju Oct 10 '15 at 06:46
  • I also increase these value. but not working –  Oct 10 '15 at 06:48
  • did u try this in `php.ini` file?? – Niranjan N Raju Oct 10 '15 at 06:51
  • 1
    @user3424093 You're answering "I've already tried this" to some comments. Don't you think it would be better if you included what you have already tried in the question? It would help you, help others help you, and help as future reference for other people with the same problem. You can do so if you click on `edit` below your post. – Mariano Oct 10 '15 at 06:53
  • actually i didnt found php.ini file in my directory. I got php.ini setting in dashboard of 1&1 server. but there have no option to change value only informations are there. –  Oct 10 '15 at 06:54
  • Do you have ssh access? – 4EACH Oct 10 '15 at 07:09
  • It seems surprising that [a method to check if a string is utf-8 or not would end up allocating 30MB](https://github.com/WordPress/WordPress/blob/master/wp-includes/formatting.php#L842). I think perhaps there's some bad data somewhere in your posts, pages, images or comments that's killing WordPress. If you up the memory limit, do you simply run out of memory at that higher limit? Does this happen on every page? Did this start happening recently? Do you get more information on the problem if you [turn on debugging](http://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging)? – Matt Gibson Oct 10 '15 at 07:16
  • No this is happened in only home page. other pages are working fine. only issue in home page. How to debug ?? please tell me.. –  Oct 10 '15 at 08:14
  • @4EACH I dont know about ssh access because i got only credentials of 1 & 1 login. is there any setting in ssh?? –  Oct 10 '15 at 08:21
  • Thanks to all who is answering me. I got solution in this link.i.e "http://www.designmission.com/1and1-com-hosting/#comments". Actually in that i upload to php.ini file in wp_admin folder which is provided in above link. –  Oct 10 '15 at 10:21

1 Answers1

1

Double value of memory_limit in php.ini file and then restart apache.

For Example:

memory_limit = 512M >>>> memory_limit = 1024M
4EACH
  • 2,132
  • 4
  • 20
  • 28
  • hey i m working on 1 & 1 server. I m not working in localhost. so please u have any idea then plz help me..its so urgent. plzz –  Oct 10 '15 at 06:59
  • What you try to do / load ? Can you separate it to smaller processes? – 4EACH Oct 10 '15 at 07:04