API function server_get_php_versions missing system php

Discussion in 'ISPConfig 3 Priority Support' started by WHO, Jun 8, 2020.

  1. WHO

    WHO Member HowtoForge Supporter

    The system PHP version (Server PHP Settings) is missing in Output of this function.
    It only contains the rows of table "server_php". On the other hand the dropdown of the PHP version in the website GUI contains the system PHP as selectable option as well.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It is actually not missing, this function exists to list, add, and edit the additional PHP versions from server_php table.
     
  3. WHO

    WHO Member HowtoForge Supporter

    How can I get all possible versions by API or at least additionally the default version?
     
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    for the default something like
    Code:
    $server = $remote->server_get($session_id, $server_id, $section ='');
    $php_version = str_replace('php', '', explode('-', $server['web']['php_fpm_init_script'])[0]);
    
    installed versions
    Code:
    $installed_versions = $remote->server_get_php_versions($session_id, $server_id, 'php-fpm');
    
     
    Th0m likes this.
  5. WHO

    WHO Member HowtoForge Supporter

    Working fine, thx :)
     

Share This Page