individual php.ini

Discussion in 'Tips/Tricks/Mods' started by exmedia, Aug 8, 2007.

  1. exmedia

    exmedia New Member

    Hello I just installed ispconfig 2.2.15 on Centos 5 and I was wondering if it could be possible to have a php.ini per website?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can do this with e.g. SuPHP. Install SuPHP on your server, then enable it in ISPConfig in the config.inc.php file and then you can add a directive for a custom php.ini file in the apache directives field of the website in ISPConfig.
     
  3. oo22

    oo22 New Member

    Does anyone know how safe this is?

    For example, will users be able to change things like memory_limit or max_execution_time in the php.ini file? If so is there a way to limit this behavior?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This is absolutely safe. Just make sure that you chown the file to the root user and group and give all other users and groups only read permissions to the php.ini file.
     
  5. oo22

    oo22 New Member

    Thanks for the quick reply!

    I'm running SuPHP right now and I don't have any php.ini files in my users sites. Couldn't a user just make a new php.ini file in the right place and take control?

    Also, I do recall using a hosting service that gave me read/write permission to a php.ini file in my user root directory.. is this just a mod of some kind or another feature request for ISPConfig?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Not if he has only read permissions.
     
  7. LaoWei

    LaoWei New Member

    max_execution_time can be changed in PHP code.

     
  8. public_domain

    public_domain New Member

    why dont you just go to php.org and read all about it. i dont think this is the forum for your current concerns. thank you.
     
  9. heymrdj

    heymrdj Member

    Public_domain, while I'm not a mod here, and your "information" of going to php.org for further info is a very good piece, the rest of your post is not. This forum is not just ISPConfig turf, but for everything linux. He is within his rights to ask here, especially because he's wanting to tie his solution to ISPC. Please leave your condescending posts in your head and out of the forum.

    Thank you.
     
  10. sv102

    sv102 New Member

    Hello! I have installed ispconfig3 and owncloud8 on devian7. I want to increase upload file size to 1gb (default 2mb) only one site (whith installed owncloud (/var/www/site.ru/web/owncloud)). I read that you need to use SuPHP and edit local site PHP.ini
    And have configured:
    and if selected use SuPHP in ispconfig panel manager site (on site.ru) then have error on page site.ru.
    Help me please.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    You posted here in the forum for the softawre ispconfig 2. On a ispconfig 2 server, you can not have a directory /usr/local/ispconfig as that belongs to ispconfig 3. So evrything written above in this thread does not apply to your server as ispconfig 2 is a completely digfferent software then ispconfig 3.

    suphp is outdated and should not be used for own, edit the suphp.conf and comment out the line "AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml", then restart apache. Next change the php setting to php-mode php-fcgi or php-fpm and set suexec to on.
     
  12. sv102

    sv102 New Member

    Last edited: Apr 29, 2015
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The custom php.ini files are in /var/www/conf/webID/php.ini
     
  14. sv102

    sv102 New Member

    Very good! I configured PHP-pfm 5.6.8 and copy
    Code:
    cp /opt/php-5.6.8/lib/php.ini /var/www/conf/web1/lib
    Configured php-pfm in ispconfig3 panel (System->Additional PHP Versions)
    Path to the PHP-FPM init script: /etc/init.d/php-5.6.8-fpm
    Path to the php.ini directory: /var/www/conf/web1/lib
    Path to the PHP-FPM pool directory: /opt/php-5.6.8/etc/pool.d
    And use for single site.

    It works! Thank you very much ;)
     

Share This Page