phpmyadmin error after installing php 8.0

Discussion in 'General' started by murdocklawless, Mar 18, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. I installed php8.0 today and it's working smoothly, I can change php version from websites menu but phpmyadmin is throwing thousands of errors?

    how can I work this thing normally again?

    here are the errors at login screen;

    Code:
    Deprecation Notice in ./libraries/classes/Url.php#221
     http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated
    
    Backtrace
    
    ./libraries/classes/Url.php#221: http_build_query(
    array,
    NULL,
    string '&',
    )
    ./libraries/classes/Header.php#231: PhpMyAdmin\Url::getCommonRaw()
    ./libraries/classes/Header.php#282: PhpMyAdmin\Header->getJsParams()
    ./libraries/classes/Header.php#214: PhpMyAdmin\Header->getJsParamsCode()
    ./libraries/classes/Header.php#142: PhpMyAdmin\Header->_addDefaultScripts()
    ./libraries/classes/Response.php#100: PhpMyAdmin\Header->__construct()
    ./libraries/classes/Response.php#134: PhpMyAdmin\Response->__construct()
    ./libraries/classes/Plugins/Auth/AuthenticationCookie.php#87: PhpMyAdmin\Response::getInstance()
    ./libraries/classes/Plugins/AuthenticationPlugin.php#247: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
    ./libraries/common.inc.php#353: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
    ./index.php#27: require_once(./libraries/common.inc.php)
    Deprecation Notice in ./../../php/Twig/Loader/FilesystemLoader.php#40
     realpath(): Passing null to parameter #1 ($path) of type string is deprecated
    
    Backtrace
    
    FilesystemLoader.php#40: realpath(NULL)
    ./libraries/classes/Template.php#61: Twig\Loader\FilesystemLoader->__construct(string 'templates/')
    ./libraries/classes/Template.php#102: PhpMyAdmin\Template->__construct(string 'login/header')
    ./libraries/classes/Plugins/Auth/AuthenticationCookie.php#111: PhpMyAdmin\Template::get(string 'login/header')
    ./libraries/classes/Plugins/AuthenticationPlugin.php#247: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
    ./libraries/common.inc.php#353: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
    ./index.php#27: require_once(./libraries/common.inc.php)
    Deprecation Notice in ./libraries/classes/Url.php#221
     http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated
    
    Backtrace
    
    ./libraries/classes/Url.php#221: http_build_query(
    array,
    NULL,
    string '&',
    )
    ./libraries/classes/Url.php#169: PhpMyAdmin\Url::getCommonRaw(
    array,
    string '?',
    )
    ./libraries/classes/Core.php#749: PhpMyAdmin\Url::getCommon(array)
    ./../../../../../../var/lib/phpmyadmin/tmp/twig/78/781a2fcd26f8d7222e0c3677150755f3a3734955aa2fa6c8121c9aec91dd39ba.php#40: PhpMyAdmin\Core::linkURL(string 'https://www.phpmyadmin.net/')
    Template.php#407: __TwigTemplate_53b077702a8825b8da118f9528dcec7bbf3200d51675d6d128fea704a639cdf4->doDisplay(
    array,
    array,
    )
    Template.php#380: Twig\Template->displayWithErrorHandling(
    array,
    array,
    )
    Template.php#392: Twig\Template->display(array)
    TemplateWrapper.php#45: Twig\Template->render(
    array,
    array,
    )
    ./libraries/classes/Template.php#133: Twig\TemplateWrapper->render(array)
    ./libraries/classes/Plugins/Auth/AuthenticationCookie.php#111: PhpMyAdmin\Template->render(array)
    ./libraries/classes/Plugins/AuthenticationPlugin.php#247: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
    ./libraries/common.inc.php#353: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
    ./index.php#27: require_once(./libraries/common.inc.php)
    Deprecation Notice in ./../../php/Twig/Node/Node.php#161
     Return type of Twig\Node\Node::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
    
    Backtrace
    
    autoload.php#369: require(./../../php/Twig/Node/Node.php)
    {closure}(string 'Twig\\Node\\Node')
    TwigFilter.php#150: class_exists(string 'Twig\\Node\\Node')
    autoload.php#369: require(./../../php/Twig/TwigFilter.php)
    CoreExtension.php#214: {closure}(string 'Twig\\TwigFilter')
    ExtensionSet.php#433: Twig\Extension\CoreExtension->getFilters()
    ExtensionSet.php#423: Twig\ExtensionSet->initExtension()
    ExtensionSet.php#184: Twig\ExtensionSet->initExtensions()
    Environment.php#871: Twig\ExtensionSet->getFunction(string 'Message_error')
    ./../../../../../../var/lib/phpmyadmin/tmp/twig/78/781a2fcd26f8d7222e0c3677150755f3a3734955aa2fa6c8121c9aec91dd39ba.php#55: Twig\Environment->getFunction(string 'Message_error')
    Template.php#407: __TwigTemplate_53b077702a8825b8da118f9528dcec7bbf3200d51675d6d128fea704a639cdf4->doDisplay(
    array,
    array,
    )
    Template.php#380: Twig\Template->displayWithErrorHandling(
    array,
    array,
    )
    Template.php#392: Twig\Template->display(array)
    TemplateWrapper.php#45: Twig\Template->render(
    array,
    array,
    )
    ./libraries/classes/Template.php#133: Twig\TemplateWrapper->render(array)
    ./libraries/classes/Plugins/Auth/AuthenticationCookie.php#111: PhpMyAdmin\Template->render(array)
    ./libraries/classes/Plugins/AuthenticationPlugin.php#247: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
    ./libraries/common.inc.php#353: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
    ./index.php#27: require_once(./libraries/common.inc.php)
    Deprecation Notice in ./../../php/Twig/Node/Node.php#166
     Return type of Twig\Node\Node::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
    
    Backtrace
    
    autoload.php#369: require(./../../php/Twig/Node/Node.php)
    {closure}(string 'Twig\\Node\\Node')
    TwigFilter.php#150: class_exists(string 'Twig\\Node\\Node')
    autoload.php#369: require(./../../php/Twig/TwigFilter.php)
    CoreExtension.php#214: {closure}(string 'Twig\\TwigFilter')
    ExtensionSet.php#433: Twig\Extension\CoreExtension->getFilters()
    ExtensionSet.php#423: Twig\ExtensionSet->initExtension()
    ExtensionSet.php#184: Twig\ExtensionSet->initExtensions()
    Environment.php#871: Twig\ExtensionSet->getFunction(string 'Message_error')
    ./../../../../../../var/lib/phpmyadmin/tmp/twig/78/781a2fcd26f8d7222e0c3677150755f3a3734955aa2fa6c8121c9aec91dd39ba.php#55: Twig\Environment->getFunction(string 'Message_error')
    Template.php#407: __TwigTemplate_53b077702a8825b8da118f9528dcec7bbf3200d51675d6d128fea704a639cdf4->doDisplay(
    array,
    array,
    )
    Template.php#380: Twig\Template->displayWithErrorHandling(
    array,
    array,
    )
    Template.php#392: Twig\Template->display(array)
    TemplateWrapper.php#45: Twig\Template->render(
    array,
    array,
    )
    ./libraries/classes/Template.php#133: Twig\TemplateWrapper->render(array)
    ./libraries/classes/Plugins/Auth/AuthenticationCookie.php#111: PhpMyAdmin\Template->render(array)
    ./libraries/classes/Plugins/AuthenticationPlugin.php#247: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
    ./libraries/common.inc.php#353: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
    ./index.php#27: require_once(./libraries/common.inc.php)
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Change back to the default php version you started with.
     
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Oh, do you mean phpmyadmin from individual sites? You can't run it under 8.0. Don't run it from individual sites at all, it's insecure, instead run it from a central location and have individual sites redirect or reverse proxy to that location if you want all those urls to work.
     
  4. I did. php -v is showing 7.4.28

    Code:
    PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:35) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
    Code:
    There are 4 choices for the alternative php (providing /usr/bin/php).
    
      Selection    Path                  Priority   Status
    ------------------------------------------------------------
      0            /usr/bin/php.default   100       auto mode
      1            /usr/bin/php.default   100       manual mode
    * 2            /usr/bin/php7.4        74        manual mode
      3            /usr/bin/php8.0        80        manual mode
      4            /usr/bin/php8.1        81        manual mode
    
    I don't know where these /usr/bin/php.default came from? what are these?

    edit : this is a symlink that connected to php8.1
     
    Last edited: Mar 18, 2022
  5. no not individual sites, starting with ispconfig ip adress like xx.xxx.xx.xx/phpmyadmin.
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    What is the default php interpreter in your web server? Eg. create a phpinfo page under the phpmyadmin directory and see what version it is. You could have eg. installed mod_php from 8.0 and it is running instead of php7.4-fpm.
     
  7. it's showing 8.0, weird? how can I turn this back to 7.4?
     
    Last edited: Mar 18, 2022
  8. I was enabled php8.0-fpm for apache with a2enconf php8.0-fpm. now I disabled it and phpmyadmin turned back to 7.4

    I took some websites to php8.0-fpm and I disabled php8.0-fpm for apache? Doesn't this affect websites running php80-fpm? because only php7.4-fpm is enabled for apache on the whole system.
     
    Last edited: Mar 18, 2022
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    No, nit if you selected PHP 8 in the websites.
     
  10. I don't quite understand what you mean?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    You have a PHP version selector in the website settings, if you selected PHP 8 there, then it is ok. if you selected there 'Default', then it's not ok.
     
  12. default is php7.4 because ispconfig was installed with it.

    a2enconf only enabled for php 7.4
    php -v shows php7.4
    php alternatives show php 7.4

    but it is a problem if PHP version selector is selected default (PHP7.4) in website settings?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to have PHP 8 in a website, then select PHP 8 in the PHP selector of the site. And never change the default version of the OS, all packages that belong to the OS are tested against that version and rely on it that it's unchanged.

    Selecting default makes no sense if you want to use a specific PHP version for a site as it changes over the years when you upgrade the OS.
     
Thread Status:
Not open for further replies.

Share This Page