PHPMyAdmin在远程服务器上未按预期工作错误500,未找到$response

ctzwtxfj  于 2022-11-09  发布在  PHP
关注(0)|答案(3)|浏览(123)

我刚刚开始我的旅程与服务器,所以我买了一个VPN。我安装在那里ubuntu 18,apache 2.4,php 8,webmin,mysql等。我有两个网站的基础上symfony 5托管在这里没有任何问题。我安装PHPmyAdmin使用Ubuntu PPA:https://github.com/phpmyadmin/phpmyadmin/wiki/DebianUbuntu#ubuntu-ppa
当我访问 mysite.com/phpmyadmin 时,一切正常。我使用凭据登录,并且已经登录。它正确读取数据库,并按预期呈现所有UI,但随后抛出错误500 Screenshot of PHPmyadmin
并且它在Apache日志中抛出错误:

[Sun Oct 10 13:00:44.298896 2021] [proxy_fcgi:error] [pid 30370:tid 140207772845824] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Unknown named parameter $$response in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php:1140\nStack trace:\n#0 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()\n#1 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(604): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService()\n#2 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(569): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet()\n#3 /usr/share/phpmyadmin/libraries/classes/Routing.php(186): Symfony\\Component\\DependencyInjection\\ContainerBuilder->get()\n#4 /usr/share/phpmyadmin/index.php(18): PhpMyAdmin\\Routing::callControllerForRoute()\n#5 {main}\n  thrown in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 1140'
[Sun Oct 10 13:00:44.359963 2021] [proxy_fcgi:error] [pid 30369:tid 140207873558272] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Unknown named parameter $$response in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php:1140\nStack trace:\n#0 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()\n#1 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(604): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService()\n#2 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(569): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet()\n#3 /usr/share/phpmyadmin/libraries/classes/Routing.php(186): Symfony\\Component\\DependencyInjection\\ContainerBuilder->get()\n#4 /usr/share/phpmyadmin/index.php(18): PhpMyAdmin\\Routing::callControllerForRoute()\n#5 {main}\n  thrown in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 1140'
[Sun Oct 10 13:00:44.411282 2021] [proxy_fcgi:error] [pid 30370:tid 140207898736384]  AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Unknown named parameter $$response in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php:1140\nStack trace:\n#0 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()\n#1 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(604): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService()\n#2 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(569): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet()\n#3 /usr/share/phpmyadmin/libraries/classes/Routing.php(186): Symfony\\Component\\DependencyInjection\\ContainerBuilder->get()\n#4 /usr/share/phpmyadmin/index.php(18): PhpMyAdmin\\Routing::callControllerForRoute()\n#5 {main}\n  thrown in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 1140'
[Sun Oct 10 13:14:58.028291 2021] [proxy_fcgi:error] [pid 30369:tid 140207798023936]  AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Unknown named parameter $$response in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php:1140\nStack trace:\n#0 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()\n#1 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(604): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService()\n#2 /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php(569): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet()\n#3 /usr/share/phpmyadmin/libraries/classes/Routing.php(186): Symfony\\Component\\DependencyInjection\\ContainerBuilder->get()\n#4 /usr/share/phpmyadmin/index.php(18): PhpMyAdmin\\Routing::callControllerForRoute()\n#5 {main}\n  thrown in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 1140'

我不知道出了什么问题。

ct2axkht

ct2axkht1#

感谢@nakashu,我找到了解决方案。
根据symfony发行他的链接:https://github.com/symfony/symfony/commit/8e34978e4e2c4bf7dac97e44e904368c4cfb54f8
我知道这只是暂时的解决方案,但是我替换了**/usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php中的代码:1140**
我改口:
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
至:
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs(array_values($arguments));
现在,phpMyAdmin正在运行。

iklwldmw

iklwldmw2#

这是phpmyadmin依赖项之一的bug /不兼容- symfony依赖项注入组件和ubuntu包。
ubuntu问题:
https://bugs.launchpad.net/ubuntu/+source/symfony/+bug/1932552
symfony问题:
https://github.com/symfony/symfony/commit/8e34978e4e2c4bf7dac97e44e904368c4cfb54f8
phpmyadmin发出消息,声明他们无法执行任何操作:https://github.com/phpmyadmin/phpmyadmin/issues/16968#issuecomment-864088274
Tldr:尝试更新你的依赖项,可能在ubnutu中更改仓库,或者等待修复程序发布。

apt-get update && apt-get upgrade -y

您也可以降级您的phpmyadmin版本(不确定是否会有帮助,因为它可以绑定到php 8. 0版本)

ux6nzvsh

ux6nzvsh3#

var_run_php_php7.1_fpm_sock;/var/run/php/php7.1-fpm.sock/var/run/php/php7.1-fpm.sock;在这个文件夹中,你可以找到一个新的文件夹。

相关问题