PHPMyAdmin致命错误-Twig_Error_Loader

时间:2018-12-12 16:39:19

标签: php phpmyadmin

我正在使用PHPMyAdmin 4.8.4,MySQL 5.7.24,PHP 7.3.0和Apache 2.4.37。每当我访问http://localhost/phpmyadmin/时,都会出现以下错误:

Fatal error: Uncaught Twig_Error_Loader: There are no registered paths for namespace "". in C:\wamp64\apps\phpmyadmin4.8.4\vendor\twig\twig\lib\Twig\Loader\Filesystem.php on line 209

使用PHP 7.2.13时不会发生此错误。我检查了Filesystem.php,但看不到是什么导致了PHP 7.3的问题。

他们是解决此错误并使PHPMyAdmin与PHP 7.3一起使用的简便方法吗?

2 个答案:

答案 0 :(得分:0)

问题可能出在您的php.ini中的这一行:

zend_extension = "......php\ext\php_opcache.dll"

如果启用了PHP 7.3.0的原始扩展名phpmyadmin,则会引发抛出异常...

致谢

答案 1 :(得分:0)

我遇到了同样的问题,请尝试:

 brew uninstall php71 //if exists another version delete all
 enter brew uninstall --force php
 brew upgrade
 sudo brew services restart dnsmasq
 uninstall valet
 composer global update
 composer global require laravel/valet
 valet install

如果存在第一个卸载,则结束安装phpmyadmin:

brew install phpmyadmin
cd /usr/local/share/phpmyadmin
valet link

您的phpmyadmin开始:www.phpmyadmin.test;)

不跑吗?尝试:

mysql -uroot
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');

享受,编码,生活:)