[SLOVED]ispconfig 3, debian 11, php 5.6 and mysql extensions

Discussion in 'Installation/Configuration' started by gec, Feb 10, 2022.

  1. gec

    gec Member

    Hi all.
    not a Linux expert but got this ispconfig installation running for almost 10 years now.
    it got through several debian upgrades (i believe from version 7 to the latest 11 two days a go).

    some time a go i've enabled and installed multiple php versions followed a guide from this site. cause I could not lose php 5.6 as i hade one app using it. This app is gone now but now we tried another, Multiplayer mission planner for Ilyushin 2 game, that also uses php 5.6 and it complains that "SEOW MP system error: MySQL is not loaded into your PHP environment!"
    phpinfo gives me the list of Additional .ini files parsed

    Code:
    etc/php/5.6/cgi/conf.d/10-opcache.ini, /etc/php/5.6/cgi/conf.d/10-pdo.ini, /etc/php/5.6/cgi/conf.d/20-calendar.ini, /etc/php/5.6/cgi/conf.d/20-ctype.ini, /etc/php/5.6/cgi/conf.d/20-exif.ini, /etc/php/5.6/cgi/conf.d/20-fileinfo.ini, /etc/php/5.6/cgi/conf.d/20-ftp.ini, /etc/php/5.6/cgi/conf.d/20-gettext.ini, /etc/php/5.6/cgi/conf.d/20-iconv.ini, /etc/php/5.6/cgi/conf.d/20-json.ini, /etc/php/5.6/cgi/conf.d/20-mysql.ini, /etc/php/5.6/cgi/conf.d/20-mysqli.ini, /etc/php/5.6/cgi/conf.d/20-pdo_mysql.ini, /etc/php/5.6/cgi/conf.d/20-phar.ini, /etc/php/5.6/cgi/conf.d/20-posix.ini, /etc/php/5.6/cgi/conf.d/20-readline.ini, /etc/php/5.6/cgi/conf.d/20-shmop.ini, /etc/php/5.6/cgi/conf.d/20-sockets.ini, /etc/php/5.6/cgi/conf.d/20-sysvmsg.ini, /etc/php/5.6/cgi/conf.d/20-sysvsem.ini, /etc/php/5.6/cgi/conf.d/20-sysvshm.ini, /etc/php/5.6/cgi/conf.d/20-tokenizer.ini
    
    but i don't see the msql table that shows that it is enabled.
    how can I investigate it?

    thx
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is the mysql module for PHP 5.6 installed? I think the package name is php5.6-mysql.
    Code:
    apt policy php5.6-mysql
     
  3. gec

    gec Member

    thx. here is what i got:
    Code:
    [email protected]:~# apt policy php5.6-mysql
    php5.6-mysql:
      Installed: (none)
      Candidate: 5.6.40-57+0~20211119.60+debian9~1.gbp8a9bd1
      Version table:
         5.6.40-57+0~20211119.60+debian9~1.gbp8a9bd1 500
            500 https://packages.sury.org/php stretch/main amd64 Packages
    [email protected]:~#
    
    
     
  4. gec

    gec Member

    what i did doo before is check for php5-mysql
    Code:
    [email protected]:~# apt-get install php5-mysql
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    php5-mysql is already the newest version (5.6.40-1~dotdeb+7.1).
    
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a php file in that website that contains the command phpinfo() and check which PHP version the site is using that reports this error and if MySQL support is present there or not.
     
  6. gec

    gec Member

    hi Till thx.
    as mentioned in my first post, I do have phpinfo(). I can see it listed under Additional .ini files parsed but there is no section where it shows that it's enabled

    I can put a link to phpinfo here if that's ok
     
    Last edited: Feb 10, 2022
  7. gec

    gec Member

    active php version for taht site from phpinfo() is
    PHP Version 5.6.40-57+0~20211119.60+debian9~1.gbp8a9bd1
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Which PHP mode have you selected for that website in ISPConfig?

    And check the file /etc/php/5.6/cgi/conf.d/20-mysql.ini to ensure that the PHP MySQL module is not commented out there.
     
  9. gec

    gec Member

    right now it's on Fast-CGI.
    here is some more info from phpinfo:
    Code:
    System Linux cp.gecnet.tk 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64
    Server API CGI/FastCGI
    Virtual Directory Support disabled
    Configuration File (php.ini) Path /etc/php/5.6/cgi
    Loaded Configuration File /var/www/conf/web18/php.ini
    Scan this dir for additional .ini files /etc/php/5.6/cgi/conf.d
    and here is 20-mysql.ini:
    Code:
    ; configuration for php MySQL module
    ; priority=20
    extension=mysql.so
    
    I do have to mention that i have two php folders in etc and this is something that looks not good to me.
    i have php5 folder, probably from original installation of ispconfig, and php folder that contains folders for 5.6.4 and 7.0-7.4 versions probably created during enabling of the multi php support.
     
  10. gec

    gec Member

    here is how it looks like
     

    Attached Files:

  11. Aeon112

    Aeon112 New Member

    try phpenmod -v 5.6 -s ALL mysql
     
  12. gec

    gec Member

    thx. tried it. did not get any messages. but nothing's changed
     
  13. Aeon112

    Aeon112 New Member

    Do u have and Special apt repos enabled, like the Repo from php sury? If so try apt-get reinstall php5.6-mysqlnd, it schould enable php by Default.
     
    gec likes this.
  14. gec

    gec Member

    ok. i did the reinstall and it looks it is working now.
    will check a bit more but thx.
    I'd call it solved for now :)
     
  15. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Check your apt sources, if you upgraded the OS to Debian 11, at least your sury.org source is still pointing to Debian 9 packages.
     
  16. Aeon112

    Aeon112 New Member

    Please Show us the Content of the files „/etc/apt/sources.list“ and „/etc/apt/sources.list.d/*“
     
  17. gec

    gec Member

    sources.list:
    Code:
    deb http://deb.debian.org/debian bullseye main
    deb-src http://deb.debian.org/debian bullseye main
    
    deb http://security.debian.org/debian-security bullseye-security main 
    deb-src http://security.debian.org/debian-security bullseye-security main
    
    # buster-updates, previously known as 'volatile'
    deb http://deb.debian.org/debian bullseye-updates main
    deb-src http://deb.debian.org/debian bullseye-updates main
    in sources.list.d dotdeb.list:
    Code:
    deb http://packages.dotdeb.org wheezy-php56 all
    deb-src http://packages.dotdeb.org wheezy-php56 all
    and php.list
    Code:
    deb https://packages.sury.org/php/ stretch main
    the original ispconfig has gone through several debian release upgrades. with my humble linux cnowledge i'm really surprised it lasts almost 10 years now
     
  18. Aeon112

    Aeon112 New Member

    Please remove Dotdeb from your system, and only install php from sury. Dotdeb is outdated and conflics with sury. Change sources list, than make an upgrade and at the very End make an ispconfig Update and reconfigure Services „y“
     
    gec likes this.
  19. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Also update php.list to 'bullseye' instead of 'stretch'.
     
    gec likes this.
  20. gec

    gec Member

    thx all. will doo
     

Share This Page