I have ubuntu 18.04 with php 8.1.6 needed for Laravel9 system but want IspConfig also

Discussion in 'Installation/Configuration' started by ralphot, Jun 9, 2022.

  1. ralphot

    ralphot Member

    Is it possible to have php 7.2 along with php 8.1.6 so I can run IspConfig?
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Sure. One can always have more than one php version i.e. multiple php in an ISPConfig server. Do search for multiple php in ISPConfig server tutorial to help you.
     
  3. ralphot

    ralphot Member

    Ok thanks, I went in there and did a search for "multiple php ubuntu". I wanted instructions for ubuntu 18.04, there were only for 12 and 13, but when I tried to go to Next page I got
    • No tutorials found.
      why?
     
  4. ralphot

    ralphot Member

    and search for "multiple php ubuntu 18"
    • No tutorials found.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

  6. ralphot

    ralphot Member

  7. ralphot

    ralphot Member

    When I try to update IsoConfig I'm getting this:
    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    Checking ISPConfig database .. OK
    Starting incremental database update.
    Loading SQL patch file: /tmp/ispconfig3-stable-old/install/sql/incremental/upd_dev_collection.sql
    PHP Fatal error: Uncaught mysqli_sql_exception: No database selected in /tmp/ispconfig3-stable-old/install/lib/mysql.lib.php:234
    Stack trace:
    #0 /tmp/ispconfig3-stable-old/install/lib/mysql.lib.php(234): mysqli_query()
    #1 /tmp/ispconfig3-stable-old/install/lib/mysql.lib.php(271): db->_query()
    #2 /tmp/ispconfig3-stable-old/install/lib/update.lib.php(412): db->query()
    #3 /tmp/ispconfig3-stable-old/install/update.php(317): updateDbAndIni()
    #4 {main}
    thrown in /tmp/ispconfig3-stable-old/install/lib/mysql.lib.php on line 234
    What's wrong? Thought it was PHP version error.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. ralphot

    ralphot Member

    Ok, I succeeded to update IspConfig but when I'm logged in there is mostly a blank screen with logo at top left and logout admin at top right and a search in the middle. No more. So? using php7.4 or shall I use 7.2?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You must use the default version that ships with the OS and that was used by ISPConfig before and you must set all default PHP 'types' to that version as the tutorial points out.
     
    ralphot likes this.
  11. ralphot

    ralphot Member

    Aha, suspected that. Thanks
     
  12. ralphot

    ralphot Member

    Ok, have now:
    root@boss2022:/tmp/ispconfig3-stable-old/install# php -v
    PHP 7.2.34-28+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov 19 2021 06:36:36) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34-28+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    root@boss2022:/tmp/ispconfig3-stable-old/install#
    but same blank IspConfig page.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    and what with:

    php-cgi -v

    output? And did you restart apache?
     
  14. ralphot

    ralphot Member

    root@boss2022:/tmp/ispconfig3-stable-old/install# php-cgi -v
    PHP 8.1.6 (cgi-fcgi) (built: May 17 2022 16:47:53)
    Copyright (c) The PHP Group
    Zend Engine v4.1.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.6, Copyright (c), by Zend Technologies
     
  15. ralphot

    ralphot Member

    I have a Laravel9 virtual website that needs 8.1
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, and the tutorial shows you how to reset that default version too. So back to the tutorial and follow all steps in the chapter about setting the correct default version.

    This is not relevant for this topic as you can set PHP version per site in ISPConfig, this is not related to the default version of the OS.
     
  17. ralphot

    ralphot Member

    Yes, missed a spot there. So now ispconfig works but my virtual website don't: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". I thought that I could have both functioning.
     
  18. ralphot

    ralphot Member

    But I can switch between the two by
    update-alternatives --config php-cgi
    So, I'm satisfied with that. Thanks for all your help till!
     
  19. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did you set PHP version on that website to 8.1 or 8.2?
    Are you doing the install as user of that website?
     
  20. ralphot

    ralphot Member

    Well, for the website http://shoot.ddnsfree.com I use PHP 8.1.6 and for IspConfig I use PHP 7.2
    I change with "update-alternatives --config php-cgi" so that's fine with me.
     

Share This Page