memory size error

Discussion in 'PHP' started by aayybb, Sep 3, 2009.

  1. #1
    Hi,

    I have the following error message. What does it mean and what I should do?

    Allowed memory size of 33554432 bytes exhausted (tried to allocate 278 bytes) in /var/www/vhosts/sample.com/httpdocs/sample.php on line 21


    Thanks for any help in advance.
     
    aayybb, Sep 3, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try adding ini_set('memory_limit', '64M'); at the top of your script.

    The error you receive is exactly what it says.. The allowed memory size your script is allowed to use is exhausted.
     
    premiumscripts, Sep 3, 2009 IP
  3. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #3
    First step should always be a google search when you get an error as you'll usually find the solution. :)
     
    theapparatus, Sep 3, 2009 IP
  4. aayybb

    aayybb Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you very much. Sorry for forgetting google first. Thanks again.
     
    aayybb, Sep 3, 2009 IP