Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2006
    Location
    Cardiff, Wales
    Posts
    802

    Thumbs up Dedicated Php.ini Files For Each Account

    Hey.
    Can some one please tell me how i can have dedicated php.ini(php setting files for each account) For example on one account i could have a post_max_size = 30mb and on another account it could equal 2mb etc.

    I am using cpanel 10.9.

    Thanks,
    Nathaniel

  2. #2
    Join Date
    Feb 2005
    Location
    Chicago, Illinois
    Posts
    143
    The only way you can really do this on a system is with something like fastcgi. Thats the only way I can really think of.

  3. #3
    Join Date
    Oct 2004
    Location
    Złocieniec, Poland
    Posts
    190
    according to php docs upload_max_filesize can be set in php.ini, httpd.conf and .htaccess

    it would be not wise to set it in .htaccess cuz users would be able to change it
    so most likely u would need to put it into httpd.conf
    to do so
    u need to put: php_value upload_max_filesize xxM into some <virtualhost x.x.x.x> or <Directory /xxx/> block (not sure which place is correct - maybe both)

    anyway i have never tried this but it should work - atleast in theory
    www.goscinnawies.pl - family business, small travel agency in Poland

  4. #4
    Join Date
    Dec 2006
    Location
    Cardiff, Wales
    Posts
    802
    i have set the upload_max_size in the main server php.ini file. I no there is a way to have a dedicated php setting file for each account. Another example is the php global feature. On most accounts i want this off. But on some i need this on.

    Thanks,
    Nathaniel
    Wholesale Direct International Sip Termination & UK Numbering (DID's/DDI's)
    Over 250 Direct Interconnects with guarnateed CLI/FAX | SIP & TDM Interconnectivity
    http://wholesale.alohatelecom.co.uk | Instant SIP Trunking at unbeatable rates http://www.voipyonder.com/

  5. #5
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Most things can be changed in .htaccess anyway using php_flag / php_value, but if you really need to use individual php.ini files then php4 run as phpsuexec does what you want - it's a standard option in CPanel.

    Search on phpsuexec for several recent discussions of the advantages / disadvantages and what you may need to do to fix broken scripts after you change over.

    Bore da!
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  6. #6
    php configuration can be override in Apache's httpd.conf, like what cPanel does for the open_basedir. But I am not sure how to let cPanel keep your configuration, not to overwite it.
    LiteSpeed Web Acceleration Platform by http://www.litespeedtech.com
    Apache drop-in replacement. Triple server capacity with 10X performance increases.
    Ultimate web serving platform for WordPress, Magento and other web applications.
    Turbo charging all WordPress sites hosted on your server with a single click!

  7. #7
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,601
    If you dump a copy of the system php.ini in your public_html you can normally override the system wide settings on an as-needs basis

    http://www.washington.edu/computing/...g/php-ini.html
    Russ Foster - Industry Curmudgeon

  8. #8
    Join Date
    Apr 2001
    Location
    Paradise
    Posts
    11,868
    That will only works if you run PHP as CGI, otherwise all the modifications have to be done by .htaccess.
    Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers - SolusVM/XEN VPS
    LiteSpeed Powered - R1Soft Continuous Data Protection - 24/7 Chat/Email/Helpdesk Support
    Cpanel/WHM - Softaculous - R1soft Backup - Litespeed - Cloudlinux -Site Builder- SSH support - Account Migration
    DowntownHost LLC - In Business since 2001- West/Center/East USA - Netherlands - Singapore

  9. #9
    Yes friend, Try to modify it from .thaccess in ini file you will get some errors

Posting Permissions

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