SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fatal error memory

    How do you use the ini_set() function to set memory_limit in php.ini file.

    Is it ini_set('memory_limit','16MB')
    or ini_set('memory_limit','16M');

    My server complains at least once a week about a fatal memory error - "default memory exhausted - tried to allocate 16789bytes ......." I have to kill and then restart the server for my pages to display. But of course I don't want to keep doing this.

    P.S. I don't want to change php.ini just change this memory limit from the script.
    Any hints!!!!

    Kerrilyn
    signature

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i don't know if you can change that value in a script. do you know that it's NOT setting it?
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fatal error

    The only reason i think its change something is because
    the error message I get when it crashes after I'd set this at top of my script came back with a similar error message but the default size had changed: something like - 16bytes memory exhausted tried to allocate 33bytes blah blah (can't remember the rest.

    Kerrilyn
    signature

  4. #4
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well if the the value changes then it must be working, right? it sounds like you need to increase the memory limit even MORE.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •