Alternative PHP version

Discussion in 'Installation/Configuration' started by ruliezz, Aug 2, 2022.

  1. ruliezz

    ruliezz Member

    Hi all,

    I try to install alternative PHP versions.
    I have followed the instructions on the page: https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/ but then with the Ubuntu ppa:eek:ndrej/php repo.

    After successfully enabling the new PHP8.1 version arcording to the instructions on that page, I have changed the PHP version on the web domain by selecting the PHP8.1 version option from the dropdown. Unfortally it doesn't update the Apache Vhost and it is still pointing to PHP7.2 the default version on the server. Any idea what I forgot or do wrong?

    (I have tried to turn off PHP for the web domain and enable it again with PHP8.1 but still has not helped.)

    Thanks!
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    How do you know that it's the wrong PHP version? You can not see in the vhost file which PHP version is used by the site. Numbers in paths like 7.2 that you might have found in vhost file are not related to the PHP version used by the site. And the vhost file is the same for all PHP versions as php versions are not configured in the vhost, they are configured in the pool and starter files only.

    If you want to see which PHP version a site uses, create an info.php file with content:

    <?php
    phpinfo();

    in the site, open it with a browser.
     
  4. ruliezz

    ruliezz Member

    @till I see this in the vhost: unix:///var/lib/php7.2-fpm or SetHandler "proxy:unix:/var/lib/php7.2-fpm e.g. but yes I did a test with a PHP file with phpinfo(); too but still the same results.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    That's what I meant, the number 7.2 in the path is no indication of a specific PHP version. That's the name of the system wide PHP folder which is used by all PHP versions, so you must see this exact same path no matter which PHP version is used in the site.

    Then please use debug mode and post the debug output to find out what the PHP version can not be changed.
     

Share This Page