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.

Memory Limit

Discussion in 'General Discussion' started by JU5TY, Nov 24, 2011.

  1. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have a website with a ‘Fatal error: Allowed memory size…’, so need to increase the memory limit for that particular website.

    I only want to increase it on that website, so don’t want to alter the root php.ini file.

    I have tried setting the limit in the htaccess file and a php.ini file within the website, but I get an Internal Server Error for both.

    Am I doing something obviously wrong?

    Is there a way to increase the memory limit from within cPanel for that particular account? As far as I can see it only shows the limit in cPanel (32MB), which isn't editable.

    Any help much appricated.
     
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello JU5TY,

    It seems suphp is enabled on your server. If you add any php directives in .htaccess, your website will throw Internal server error. Remove the changes made in .htaccess and increase the memory limit in php.ini within the website.
     
  3. JU5TY

    JU5TY Member

    Joined:
    Nov 11, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Thanks for your reply, that's good to know regarding php/.htaccess and suphp.

    I managed to get it working in the end my setting the memory limit at the top of the document:

    ini_set("memory_limit","128M");
     
Loading...

Share This Page