The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

enable-memory-limit in PHP

Discussion in 'General Discussion' started by kaesar, Nov 15, 2004.

  1. kaesar

    kaesar Member

    Sep 4, 2004
    Likes Received:
    Trophy Points:

    I wonder why easyapache in WHM dont compile PHP with --enable-memory-limit option.

    It allows unexperienced webmasters can upload buggy PHP scripts and it eats all memory of server until crash.

    Yesterday one of our clients upload a .php file with an infinite loop (a big and ugly infinite loop) , 10 seconds later , all the server resources was wasted and the server hangs up. It was an error of the coder, but it demostrates what vulnerable is the compilation of PHP made by easyapache.

    There is a way of limit this ? , i think this could be avoid with --enable-memory-limit option in PHP compile. How could i add this to easyapache? There are another way to avoid this?

    In my httpd.conf exists this sentences:

    RLimitMEM 204161365
    RLimitCPU 240

    but this wasnt able to avoid the problem.

Share This Page