Unable to change PHP version

Discussion in 'ISPConfig 3 Priority Support' started by variable99, Aug 24, 2024.

  1. variable99

    variable99 Member HowtoForge Supporter

    I faced problem where 1 of my 5 servers are unable to set different PHP version other than default. No errors in debug log:

    Code:
    Sat Aug 24 11:55:05 AM EEST 2024 24.08.2024-11:55 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
    Sat Aug 24 11:55:05 AM EEST 2024 24.08.2024-11:55 - DEBUG [apache2 plugin.inc:3464] - Writing the PHP-FPM config file: /etc/php/8.2/fpm/pool.d/web438.conf
    Sat Aug 24 11:55:06 AM EEST 2024 24.08.2024-11:55 - DEBUG [services.inc:56] - Calling function 'restartPHP_FPM' from module 'web_module'.
    Sat Aug 24 11:55:06 AM EEST 2024 24.08.2024-11:55 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    Sat Aug 24 11:55:07 AM EEST 2024 24.08.2024-11:55 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'php8.2-fpm' 2>&1 - return code: 0
    It does not go to 7.4 pool folder. I'am trying to setup PHP version from ISPC directly and via API.
    Other servers are able to set correct PHP version.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    According to the log the PHP version chosen for this site is 8.2 and not 7.4. Please post the output of:

    ls -la /etc/php/8.2/fpm/pool.d/web438.conf

    to see if the file has been written. Double-check that you have set the PHP version for this exact site to 7.4, then check if you have really added PHP 7.4 for this server under System > server config and that the settings of this PHP version really use the PHP 7.4 folder. Maybe you just named that PHP version 7.4 and used the 8.2 pool folder for that. Also ensure that you really installed that PHP version on the target system.
     
  3. variable99

    variable99 Member HowtoForge Supporter

    ls -la /etc/php/8.2/fpm/pool.d/web438.conf
    -rw-r--r-- 1 root root 1546 Aug 24 13:10 /etc/php/8.2/fpm/pool.d/web438.conf

    [​IMG]
    [​IMG]

    Double checked, PHP ID's are correctly set in the DB. php7.4, php8.1 etc. exists on the server.
    [​IMG]
    Here is more brief log:

    Code:
     tail -f ispconfig.log
    24.08.2024-13:45 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    24.08.2024-13:45 - DEBUG [server:184] - Found 1 changes, starting update process.
    24.08.2024-13:45 - DEBUG [modules.inc:177] - Replicated from master: REPLACE INTO `web_domain` (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`ip_address`,`ipv6_address`,`domain`,`type`,`parent_domain_id`,`vhost_type`,`document_root`,`web_folder`,`system_user`,`system_group`,`hd_quota`,`traffic_quota`,`cgi`,`ssi`,`suexec`,`errordocs`,`is_subdomainwww`,`subdomain`,`php`,`ruby`,`python`,`perl`,`redirect_type`,`redirect_path`,`seo_redirect`,`rewrite_to_https`,`ssl`,`ssl_letsencrypt`,`ssl_letsencrypt_exclude`,`ssl_state`,`ssl_locality`,`ssl_organisation`,`ssl_organisation_unit`,`ssl_country`,`ssl_domain`,`ssl_request`,`ssl_cert`,`ssl_bundle`,`ssl_key`,`ssl_action`,`stats_password`,`stats_type`,`allow_override`,`apache_directives`,`nginx_directives`,`php_fpm_use_socket`,`php_fpm_chroot`,`pm`,`pm_max_children`,`pm_start_servers`,`pm_min_spare_servers`,`pm_max_spare_servers`,`pm_process_idle_timeout`,`pm_max_requests`,`php_open_basedir`,`custom_php_ini`,`backup_interval`,`backup_copies`,`backup_format_web`,`backup_format_db`,`backup_encrypt`,`backup_password`,`backup_excludes`,`active`,`traffic_quota_lock`,`proxy_directives`,`last_quota_notification`,`rewrite_rules`,`added_date`,`added_by`,`directive_snippets_id`,`enable_pagespeed`,`http_port`,`https_port`,`folder_directive_snippets`,`log_retention`,`proxy_protocol`,`server_php_id`,`jailkit_chroot_app_sections`,`jailkit_chroot_app_programs`,`delete_unused_jailkit`,`last_jailkit_update`,`last_jailkit_hash`,`disable_symlinknotowner`) VALUES ('438','475','475','riud','ru','','14','*','','domain.lt','vhost','0','name','/var/www/clients/client474/web438','','web438','client474','1024','102400','n','n','y','1','1','www','php-fpm','n','n','n','','','','y','y','y','n','','','','','AF','domain.lt','','','','','','$6$rounds=5000$8af79cc422c47369$DbvKfNuQSwGpFZDid8T7P/ne0PMQzfscA6MxN5sPfDXyZn5.N22SEdPz5ctYlmU663ilcipBvi1IgXaemSxWH/','goaccess','All','','','n','n','ondemand','3','1','1','1','10','100','/var/www/clients/client474/web438/web:/var/www/clients/client474/web438/private:/var/www/clients/client474/web438/tmp:/var/www/domain.lt/web:/srv/www/domain.lt/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom','disable_functions=mail,link,symlink,exec,passthru,proc_close,proc_get_status,proc_open,shell_exec,system,popen,pclose\r\nallow_url_fopen=On\r\nallow_url_include=Off\r\nupload_max_filesize=64M\r\npost_max_size=64M\r\nmax_input_time=300\r\nmax_input_vars=10000\r\nmemory_limit=256M\r\ndisplay_errors=Off\r\nerror_reporting=22519\r\nshort_open_tag=On','none','1','default','gzip','n','','','y','n','',NULL,'','2024-08-22','api','0','n','80','443',NULL,'30','n','21','','','n',NULL,NULL,'n')
    24.08.2024-13:45 - DEBUG [plugins.inc:118] - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    24.08.2024-13:45 - DEBUG [plugins.inc:118] - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: chattr -i '/var/www/clients/client474/web438' - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: chattr +i '/var/www/clients/client474/web438' - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: df -T '/var/www/clients/client474/web438'|awk 'END{print $2,$NF}' - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: which 'setquota' 2> /dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: setquota -u 'web438' '1048576' '1049600' 0 0 -a &> /dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: setquota -T -u 'web438' 604800 604800 -a &> /dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: chattr -i '/var/www/clients/client474/web438' - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: usermod --groups sshusers 'web438' 2>/dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: chattr +i '/var/www/clients/client474/web438' - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:1831] - Enable SSL for: domain.lt
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:1892] - Writing the vhost file: /etc/apache2/sites-available/domain.lt.vhost
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:3173] - Created GoAccess config file: /var/www/clients/client474/web438/log/goaccess.conf
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:3464] - Writing the PHP-FPM config file: /etc/php/8.2/fpm/pool.d/web438.conf
    24.08.2024-13:45 - DEBUG [services.inc:56] - Calling function 'restartPHP_FPM' from module 'web_module'.
    24.08.2024-13:45 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'php8.2-fpm' 2>&1 - return code: 0
    24.08.2024-13:45 - DEBUG [web module.inc:316] - Restarting php-fpm: systemctl reload php8.2-fpm.service
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:2010] - Apache status is: running
    24.08.2024-13:45 - DEBUG [services.inc:56] - Calling function 'restartHttpd' from module 'web_module'.
    24.08.2024-13:45 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    24.08.2024-13:45 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'apache2' 2>&1 - return code: 0
    24.08.2024-13:45 - DEBUG [web module.inc:246] - Restarting httpd: systemctl restart apache2.service
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:2013] - Apache restart return value is: 0
    24.08.2024-13:45 - DEBUG [apache2 plugin.inc:2024] - Apache online status after restart is: running
    24.08.2024-13:45 - DEBUG [modules.inc:205] - Processed datalog_id 54523
    24.08.2024-13:45 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
     
  4. variable99

    variable99 Member HowtoForge Supporter

    Ok, problem resolved. The problem was in slave server database. Table "server_php" had wrong PHP path and init script values. 0 clue why, but editing entries from ISPC side got set values correctly.
     
    till likes this.

Share This Page