Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    51
    Thanks
    18
    Thanked 0 Times in 0 Posts

    PHP Fatal error: Allowed memory size of 262144000 bytes exhausted

    I wrote a calendar script and published it on a website. Just recently, someone found a bug that has me completely baffled because I can't reproduce it. Could someone take a look at the comments and see what they think it might be? (It's a brand new site, and the only comments are the one about this bug)

    http://keilascode.com/commentator/contact.php

    I also re-setup the calendar script on an entirely different web host than the URL above and still was not able to reproduce the problem that the person is having. I'm asking him for info to see where the bug is happening, but it's just weird that I can't reproduce the problem. The guy is suggesting that maybe it's a permission issue, but I don't know much about that... Any ideas?

    Thanks!
    Last edited by hunter1611; 01-16-2013 at 09:35 PM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Thats a lot of megs.
    Script is useless, post the code. You're looking for [likely] an infinite loop condition.

  • Users who have thanked Fou-Lu for this post:

    hunter1611 (01-16-2013)

  • #3
    New Coder
    Join Date
    Jan 2011
    Posts
    51
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Yeah, I didn't expect anyone to stare at my script. I just wanted a nudge in the right direction, which is what you gave! I found the infinite loop and rewrote it so that it is no longer infinite... Still won't fix my problem because the parameters were causing the loop to never end and I don't know why those would have been wrong, but at least now, next time the bug shows itself, I should be able to figure out what's ACTUALLY going on.

    Thanks!

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Yep you betcha.
    Prime candidate for memory exhaustion is using the GD especially in a loop. It takes a lot of memory to allocate and manipulate images, so if you were to loop it and have an infinite loop, it could run out of memory before the script default timeout.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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