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.

Override php.ini directives

Discussion in 'General Discussion' started by mehrdad abed, Jun 3, 2007.

  1. mehrdad abed

    mehrdad abed Well-Known Member

    Joined:
    Mar 18, 2006
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    I just upgraded to apache ver 2, and now I've Suphp instead of phpsuexe, it seems php runs as a apache module in this way, but now i don't know how to change php.ini rules. i just added these for one of my vhost and it just dosent work:

    was :
    <IfModule mod_php5.c>
    php_admin_value open_basedir "/home/tomy:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>


    is :
    <IfModule mod_php5.c>
    php_admin_value upload_max_filesize "10M"
    php_admin_value open_basedir "/home/tomy:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>

    I really need to be able to change the php directives over each account, so please let know where I'm wrong in.

    Thanks
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    If PHP is running as an Apache module then you can change the php.ini directives values in the .htaccess of each account.
     
  3. mehrdad abed

    mehrdad abed Well-Known Member

    Joined:
    Mar 18, 2006
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    but i want to take some rules that shouldn't be overridden by .htaccess, on the other hand i try to force some rules over the clients.
     
    #3 mehrdad abed, Jun 3, 2007
    Last edited: Jun 3, 2007
  4. mehrdad abed

    mehrdad abed Well-Known Member

    Joined:
    Mar 18, 2006
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    It's kind of strange because it seems none of the applied apache rules work, even "php_admin_value open_basedir" is set as "no value" in the result of phpinfo() as i'd added it in php5 tags in httpd.conf.
    i also used "suPHP_ConfigPath" in the middle of <IfModule mod_suphp.c>... </IfModule> something like this :

    <IfModule mod_suphp.c>
    suPHP_UserGroup tomy tomy
    suPHP_ConfigPath /etc/httpd/conf/php_ini/php.ini
    </IfModule>

    but dosent work.

    please help
     
Loading...

Share This Page