help : Fatal error : out of memory (allocated ??

Discussion in 'PHP' started by nyssa, Sep 18, 2010.

  1. #1
    please help me out, i have a problem in php side bar. this bar contains tags from website..

    Fatal error: Out of memory (allocated 42729472) (tried to allocate 32 bytes) in /home/XXX/public_html/XX/rightbar.php on line 262


    thankx in advance
     
    nyssa, Sep 18, 2010 IP
  2. seoforall

    seoforall Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ini_set(memory_limit, 0);
     
    seoforall, Sep 18, 2010 IP
  3. dreamconception

    dreamconception Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Usually it is a problem with loop or similar that eats up all the memory. However just raise the memory limit and see if that helps as seoforall suggest.
     
    dreamconception, Sep 18, 2010 IP
  4. sunlcik

    sunlcik Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Keep increasing the memory limit until your script fits or your server squeals for mercy.

    You can also make this change permanently for all PHP scripts running on the server by adding a line like this to the server’s php.ini file:

    change memory_limit = 15M to memory_limit = 64M[(you should change this value)

    Keep in mind that a huge memory limit is a poor substitute for good coding. A poorly written script may inefficiently squander memory which can cause severe problems for frequently executed scripts. However, some applications are run infrequently and require lots of memory like importing and processing a big data file.
     
    sunlcik, Sep 18, 2010 IP
  5. nyssa

    nyssa Member

    Messages:
    176
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #5
    thankx friends,
    acutally this is my website http://clearwebstats.com in right bar I used to display tag keyword, but the problem is I can't see any memory setup, it should be there before right? or should I just add ini_set(memory_limit, 0); ???

    regarding changing memory, looking for memory limit which I can change to 4M, 16M, and 32M but can't find any code, should I just add an code about changing memory or what?? will u tell me plz..
     
    nyssa, Sep 18, 2010 IP