PHP what PHP.ini changes systemwide - search gives me 13 php.ini's

  • Hi


    I need to activate 2 PHP-Modules, what php.ini is (are) responsible for all Domains in I-MSCP?


    Regards
    Jan

  • @jvanl


    Assuming that you want install the modules from Debian or Ubuntu repository, install the modules you want through APT, them make sure to activate them using phpenmod and once done, restart either Apache2 (Fcgid or ITK cases), or php-fpm instance.


    For instance, if while installing i-MSCP you have selected PHP 5.6 and you want make use of the ssh2 PHP module, you need in order:

    Shell-Script
    1. # apt-get update# apt-get install php-ssh2# phpenmod ssh2

    and then, depending of the i-MSCP Httpd server implementation you are using:


    FPM:

    Shell-Script
    1. # service php5.6-fpm restart


    Fcgid or ITK:

    Shell-Script
    1. # service apache2 restart

    [hr]


    Note that with i-MSCP, there is a global php.ini for each PHP versions, and at least one php.ini file or FPM pool configuration file per customer, per domain or per site, depending on your configuration. Note also that with Debian/Ubuntu, you should never edit the php.ini files to enable your modules. Instead, you should create specific ini configuration files for your own modules in the /etc/php/<php_version>/mods-available/ directory and activate them through phpenmod. Of course, you need also restart Apache2 or the PHP-FPM instance, depending on your configuration as explained above.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi,


    I have loaded some failing packages so now phpenmod is working.
    I run ubuntu 16.04.


    There is something I do not understand, I have PHP 5.6 / 7.0 / 7.1 in /etc/php/x.x.
    With a2dismod and a2enmod I can change PHP version on the commandline but it has no effect in i-mscp,
    when I run phpinfo i always get 5.6.


    Where is the php.ini file for the customer, I have been through the files with mc but found no php.ini.


    Thanks for all the support.


    Regards
    Jan

  • With a2dismod and a2enmod I can change PHP version on the commandline but it has no effect in i-mscp,
    when I run phpinfo i always get 5.6.

    You should avoid to run commands without understand them.. a2enmod/a2dismod is a frontend for Apache2 modules handling... Here you have enabled/disabled Apache2 PHP modules. However:


    i-MSCP doesn't forcibly use PHP as Apache2 module
    You must never change a PHP version manually... You must use the i-MSCP installer to change the system PHP version


    For the customers php.ini (or FPM pool configuration file) location, this depend on your i-MSCP configuration.


    Please do a search on our forums. We already answered those questions and anyway, you don't provide us sufficient information to give you a clear answer.


    Also please, read:

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thank you,


    i know that blindly giving commands can be harmfull but i rented this vserver mainly to see if i can work with i-mscp,
    so no real harm can be done. I once was a systemmanager for VaxVMS, been outside ICT for over 10 years and now back,
    a little older and thus a bit slower in grasping the point.


    I promis to provide more information next time and i do search the forum probably not very efficiently.


    What was unclear to me is that with the installer I can reconfigure. That is what I will be doing next.
    i-mscp is quite large but i am doing my best to learn.


    Kind regards,
    Jan