Increase memory_limit in a site only, using htaccess/php.ini, PHP as CGI

Discussion in 'PHP' started by basketmen, Apr 17, 2011.

  1. #1
    Hi guys, i have a dedicated server, the php are using fast-cgi
    the server memory_limit in whm is 32M globally for all sites


    now i want memory_limit is 256M only in a sites, lets say domain1.com
    i already try using htaccess but its get 500 errors, maybe because its using fast-cgi

    .htaccess file
    and also tried






    Then i try using php.ini file in the domain1.com site root, but still not changed, i check in phpinfo.php

    php.ini file
    or





    i already read few articles like below and try all, but no one works
    http://www.dialme.com/m/articles/view/-htaccess-php-ini-Help-Guide#cgi
    http://blog.paulgu.com/2008/09/03/increase-upload-size-in-your-phpini/







    i already tried add that htaccess/php.ini file in other site in that server, and checking using phpinfo file in that site too, but still no one working too, no one the memory_limit changed. Please help what can be make it not working


















    here are my phpinfo content


     
    basketmen, Apr 17, 2011 IP
  2. littlejohn199

    littlejohn199 Peon

    Messages:
    42
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you can add this on top of your php script

    ini_set('memory_limit', '256M');

    Hope this helps!
    Little John
    ----------------
    bitonwire.com
     
    littlejohn199, Apr 17, 2011 IP