Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Location
    Nottingham
    Posts
    60

    Question PHP Memory Limits

    Hi everyone,

    I have a Linux VPS running with WHM/Cpanel from EUKHost. It has 512meg of RAM and I have set the PHP memory limit to 96meg. When I run phpinfo() it shows the memory limit as 96 meg as expected.

    However, I have a gd script and it is running out of memory when it exceeds 16 meg. Does anyone have any ideas as to what this could be?

    Many thanks, Ian

  2. #2
    Join Date
    May 2011
    Posts
    29

    Default

    Hi,

    Only a guess, but do you have a .htaccess file where your script lives that limits the php memory? I'm not sure if the memory limit in a .htaccess overrides what is in the php.ini.

  3. #3
    Join Date
    Aug 2007
    Location
    Nottingham
    Posts
    60

    Default

    Hi there,

    thanks for your reply. No, I have not changed memory in either .htaccess nor via a php.ini file. As I say, when I run phpinfo() it shows the memory limit as 96M as expected. However, scripts are falling over when they reach 16M.

  4. #4
    Join Date
    Aug 2007
    Location
    Nottingham
    Posts
    60

    Default

    Hi all,

    just to let you know I have discovered the answer. There is a feature in WHM which limits the amount of memory a process uses in Apache (so doesn't show up in PHP variables). So I added a main.local file, commented out the RLimitMEM line and rebuilt httpd.conf and everything works as expected now.

    Kind regards, Ian

  5. #5

    Default

    I'm glad you solved it out on your own, and thanks for coming back to tell us. This way, people will know what to do if they happen to bump into this problem...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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