Softaculous fails to load PHP modules on Ubuntu 22.04

Discussion in 'Plugins/Modules/Addons' started by supportunlimited, Sep 27, 2023.

  1. supportunlimited

    supportunlimited New Member

    Hello all
    I am trying to get an instance of these 2 working together. I initially tried it on a local install behind my home/office firewall using static internal IP.

    https://www.softaculous.com/docs/admin/installing-softaculous-in-ispconfig/

    I thought the internal IP was screwing up the self-signed SSL cert which was causing Softaculous to not function correctly.
    I allowed a tunnel through to the machine, but still received the blank white screen with nothing in the logs. I went through their suggestions about adding lines to the php.ini for the extensions, and that didn't change anything.
    I then put it on a live instance with a normal static IP and am experiencing the exact same white screen. I've looked through the access, error, and othervhost log files and cannot see anything that would be triggering an error.
    I've checked to make sure all the php modules are loading, and they are.

    Thoughts?
    Alex
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm not sure where Softaculous installs itself as it's outside of ISPConfig and ISPConfig is not in control of that software environment that Softaculous uses, so it likely writes its own logs in a different place. I recommend you ask Softaculous support for help with where to find these Apache or Nginx error logs from Softaculous software that should reveal which PHP extensions might be missing or settings are not correct for Softaculous. It might also be that Softaculous is not compatible with that PHP version or that its code is encoded and a suitable loader for the code is missing.
     
    ahrasis likes this.
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    From the link you gave, I don't think it supports multi server or access for remote server for that matter. If you really want to use it, follow its instructions word by word, thus test it on a single ISPConfig server with public IP.
     
    Ranzy Campbell likes this.
  4. supportunlimited

    supportunlimited New Member

    I don't have it using the multiserver feature. And I set it up on a public IP server to no avail.
    Per Till's suggestion, I went to their support and posted a request for help and was questioned about the php modules loading.
    I looked into the Softaculous error logs and found these errors in there.
    Code:
    [27-Sep-2023 11:39:31 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/lib/php/20210902/mysql.so (/usr/lib/php/20210902/mysql.so: cannot open shared object f
    [27-Sep-2023 11:39:31 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib/php/20210902/mysqli.so (/usr/lib/php/20210902/mysqli.so: undefined symbol: mysqln
    [27-Sep-2023 11:39:31 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20210902/json.so (/usr/lib/php/20210902/json.so: cannot open shared object file
    [27-Sep-2023 11:39:31 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php:83
    I looked at what modules were loaded via a "php -m" check at the console and it listed all but that mysql.so module as loaded.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    What you see from this command are the modules the operating system is using (and ISPConfig as well). But when I look at their installation page, it seems as if Softaculous does not use the normal PHP setup of the operating system. It uses at least a separate php.ini file here /usr/local/softaculous/php.ini

    ISPConfig itself does work, you can login to ISPConfig GUI?
    Which operating system do you use and which tutorial have you followed to install the server?
     
  6. supportunlimited

    supportunlimited New Member

    Yes ISPConfig works the way it should, and yes I can log in to the GUI.
    I chose to use Ubuntu 22.04LTS and I sed your auto installer.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of the command:

    ls -la /usr/lib/php/20210902/
     
  8. supportunlimited

    supportunlimited New Member

    Code:
    total 12512
    drwxr-xr-x  2 root root    4096 Sep 26 19:36 .
    drwxr-xr-x 20 root root    4096 Sep 26 19:36 ..
    -rw-r--r--  1 root root   35080 Sep  2 02:59 calendar.so
    -rw-r--r--  1 root root   14600 Sep  2 02:59 ctype.so
    -rw-r--r--  1 root root  117000 Sep  2 02:59 curl.so
    -rw-r--r--  1 root root  198920 Sep  2 02:59 dom.so
    -rw-r--r--  1 root root   96520 Sep  2 02:59 exif.so
    -rw-r--r--  1 root root  174344 Sep  2 02:59 ffi.so
    -rw-r--r--  1 root root 7153984 Sep  2 02:59 fileinfo.so
    -rw-r--r--  1 root root   67848 Sep  2 02:59 ftp.so
    -rw-r--r--  1 root root  112904 Sep  2 02:59 gd.so
    -rw-r--r--  1 root root   18696 Sep  2 02:59 gettext.so
    -rw-r--r--  1 root root   51464 Sep  2 02:59 iconv.so
    -rw-r--r--  1 root root  112904 Sep  2 02:59 imap.so
    -rw-r--r--  1 root root  477536 Sep  2 02:59 intl.so
    -rw-r--r--  1 root root 1069920 Sep  2 02:59 mbstring.so
    -rw-r--r--  1 root root  162056 Sep  2 02:59 mysqli.so
    -rw-r--r--  1 root root  231280 Sep  2 02:59 mysqlnd.so
    -rw-r--r--  1 root root 1023016 Sep  2 02:59 opcache.so
    -rw-r--r--  1 root root   35080 Sep  2 02:59 pdo_mysql.so
    -rw-r--r--  1 root root  121096 Sep  2 02:59 pdo.so
    -rw-r--r--  1 root root   39176 Sep  2 02:59 pdo_sqlite.so
    -rw-r--r--  1 root root  284936 Sep  2 02:59 phar.so
    -rw-r--r--  1 root root   43272 Sep  2 02:59 posix.so
    -rw-r--r--  1 root root   26888 Sep  2 02:59 pspell.so
    -rw-r--r--  1 root root   39176 Sep  2 02:59 readline.so
    -rw-r--r--  1 root root   18696 Sep  2 02:59 shmop.so
    -rw-r--r--  1 root root   59656 Sep  2 02:59 simplexml.so
    -rw-r--r--  1 root root  338184 Sep  2 02:59 soap.so
    -rw-r--r--  1 root root  104712 Sep  2 02:59 sockets.so
    -rw-r--r--  1 root root   67848 Sep  2 02:59 sqlite3.so
    -rw-r--r--  1 root root   22792 Sep  2 02:59 sysvmsg.so
    -rw-r--r--  1 root root   14600 Sep  2 02:59 sysvsem.so
    -rw-r--r--  1 root root   22792 Sep  2 02:59 sysvshm.so
    -rw-r--r--  1 root root   63752 Sep  2 02:59 tidy.so
    -rw-r--r--  1 root root   35080 Sep  2 02:59 tokenizer.so
    -rw-r--r--  1 root root   43272 Sep  2 02:59 xmlreader.so
    -rw-r--r--  1 root root   59656 Sep  2 02:59 xml.so
    -rw-r--r--  1 root root   51464 Sep  2 02:59 xmlwriter.so
    -rw-r--r--  1 root root   39176 Sep  2 02:59 xsl.so
    -rw-r--r--  1 root root   84232 Sep  2 02:59 zip.so
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, and what's in the file:

    /usr/local/softaculous/conf/custom.ini
     
  10. supportunlimited

    supportunlimited New Member

    Code:
    extension=mysql.so
    extension=mysqli.so
    extension=curl.so
    extension=soap.so
    extension=posix.so
    extension=json.so
    extension=xml.so
    extension=ftp.so
    extension=mbstring.so
    extension=simplexml.so
    extension=zip.so
    
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Please change its content like this:

    Code:
    extension=mysqlnd.so
    extension=mysqli.so
    extension=curl.so
    extension=soap.so
    extension=posix.so
    extension=json.so
    extension=xml.so
    extension=ftp.so
    extension=mbstring.so
    extension=simplexml.so
    extension=zip.so
    Then install the missing php json extension with:

    sudo apt install php-json

    in case the command fails, use:

    apt install php8.1-json

    I don't have an Ubuntu system at hand to say which one is the right command.
     
  12. supportunlimited

    supportunlimited New Member

    Code:
    [28-Sep-2023 19:00:54 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/lib/php/20210902/mysql.so (/usr/lib/php/20210902/mysql.so: cannot open shared object file: No such file or directory), /usr/lib/php/20
    [28-Sep-2023 19:00:54 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib/php/20210902/mysqli.so (/usr/lib/php/20210902/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php/20210902/mysqli.so
    [28-Sep-2023 19:00:54 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20210902/json.so (/usr/lib/php/20210902/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210
    [28-Sep-2023 19:00:54 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php:83
    Stack trace:
    #0 /usr/local/ispconfig/interface/lib/app.inc.php(70): db->__construct()
    #1 /usr/local/ispconfig/interface/lib/app.inc.php(405): app->__construct()
    #2 /usr/local/softaculous/includes81/load.php(31): unknown()
    #3 /usr/local/softaculous/load.php(23): include_once('/usr/local/soft...')
    #4 {main}
      thrown in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 83
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you must ask the Softaculous support, their docs claim that Softaculous uses the file /usr/local/softaculous/conf/custom.ini to load PHP tensions and if you edited the file the way I have shown in #11, then the file does not contain
    extension=mysql.so anymore as mysql support is provided by mysqlnd and mysqli in recent PHP versions, which are both installed. Nonetheless the software seems to try to still load it. Also json should be installed now if you ran the apt commands, but it claims still that it is not there. Or Softaculous needs to be restarted somehow. You can also try restarting the whole system to see if that helps.
     
  14. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Agreed with this. I would remove all of them first (php-mysql php-mysqli php-json php8.1-mysql php8.1-mysqli php8.1-json) and install them again.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't think that reinstalling working PHP modules will help, it just might cause damage. There is no problem with these php modules as ISPConfig uses them and works fine, so they are installed and work correctly when being used with the configuration of the system PHP. Softaculous itself uses a different PHP setup that is non-standard and does not use php.ini of the operating system and that's what fails and causes the modules to not being loaded.

    what he can try though is to install php-mysql package in addition to php mysqli and php mysqlnd which are already there, maybe Softaculous is not capable of using current PHP MySQL drivers yet as typically used in PHP 8.x.
     
  16. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    When I read its install script it does cover up to php8.1. So my earlier assumption was, may be the said modules were broken, and so the advise, but you were right when you said it works with ISPConfig, so that should not be the issue. Re-reading its install script again, I think it uses default php, which is supposedly php8.1 for Ubuntu 22.04, so double check whether the default php is correct for that server as that might be the actual cause.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    This whole thing is basically not an ISPConfig issue, ISPConfig works fine according to the user. So I think Softaculous support should help him to fix that and update their installation instructions to cover Ubuntu 22.04 as he bought their software, which does not work at the moment. So it's their turn to fix that if they do not want to refund him the money for the license.
     
    Th0m likes this.
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Th0m likes this.
  19. supportunlimited

    supportunlimited New Member

    Update for this issue. I reached out to them and they logged into my server and just told me to add a domain.
    I did so, and everything came up as it should.

    Very strange.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Strange indeed. I guess they changed or installed something else as well to fix that. But it works now, so that's good :)
     
    ahrasis likes this.

Share This Page