Announcement

Collapse
No announcement yet.

[2.2.1]Fatal Error: Allowed memory size ..... exhausted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [2.2.1]Fatal Error: Allowed memory size ..... exhausted

    Hi there

    I do have a big problem with my forums.
    This error occours (not continously, but often coincidentally):

    Code:
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate xxxxxx bytes) in
    /home/theuser/public_html/myforum/admin/functions.php on line 507
    This is what my functions.php says on line 507:

    PHP Code:
    // do ip addresses
        
    if ($post[ip]!="") {
            if (
    $logip==2) {
                eval(
    "\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
            }
            if (
    $logip==1) {
                eval(
    "\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
            }
            if (
    $logip==0) {
                
    $post[iplogged]="";
            } 
    //[b][color="black"]<<<<---- Line 507!![/color][/b][color="black"][/color]
        
    } else {
            
    $post[iplogged]="";
        }
    $post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]); 
    I'm running:
    Linux / PHP v4.0.6 Safe Mode
    mySQL v3.23.37-log

    I've searched your forums, but I found no result on my search. Any help would be appreciated.

    Kind regards,
    Amasov
    Last edited by Amasov; Sun 4 Aug '02, 8:51am.
    German:
    DCF: The matter of IT-Support

  • #2
    PHP hit its memory limit. The easiest thing would be to increase the memory_limit configuration option in php.ini. I'd try 16M (16 megabytes). I doubt you could change this through a .htaccess file.

    Comment


    • #3
      Thanks for your answer!

      I thought about that, Ed, but PHP is trying to allocate only a few bytes. Here are two real examples:

      Code:
      Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 128385 bytes) in
      /home/theuser/public_html/myforums/admin/functions.php on line 507
      and

      Code:
      Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 285532 bytes) in
      /home/theuser/public_html/myforums/admin/functions.php on line 507
      Do you think I should increase the memory_limit in php.ini anyway ?
      Last edited by Amasov; Sun 4 Aug '02, 2:19pm.
      German:
      DCF: The matter of IT-Support

      Comment


      • #4
        Well if it's only allocated 8 MB for example, and it's at 7.99 MB and it tries to allocate 0.02 MB, the same thing will happen.
        --filburt1, vBulletin.org/vBulletinTemplates.com moderator
        Web Design Forums.net: vB Board of the Month
        vBulletin Mail System (vBMS): webmail for your forum users

        Comment


        • #5
          Increasing the memory allocation to 16mb is the best idea.
          Scott MacVicar

          My Blog | Twitter

          Comment


          • #6
            To be or not to be .... so shall it be!

            I've increased the memory limit to 16M and until now it's working again like a charm.

            We will see ...

            Thanks a lot

            Kind regards,
            Amasov
            German:
            DCF: The matter of IT-Support

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X