phpmyadmin折旧通知通知PHP 8

发布于 2025-01-30 09:54:51 字数 456 浏览 5 评论 0原文

在升级PhpMyAdmin后,在执行任何任务时都会显示许多警告和通知。错误如下所示。

折旧通知in。\ vendor \ twig \ twig \ src \ src \ loader \ filesystemloader.php#40 realpath():将null传递到类型字符串的参数#1($ path)被弃用的

Deprecation Notice in .\vendor\twig\twig\src\Markup.php#35

返回类型twig \ markup :: count()应与可计数:: count():int或#[\ return typewillchange兼容]属性应暂时抑制通知

Deprecation Notice in .\libraries\classes\Util.php#1936

功能strftime()已弃用

After upgrading phpmyadmin lots of warnings and notices is being shown while running any task. errors is shown below.

Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40
realpath(): Passing null to parameter #1 ($path) of type string is deprecated

Deprecation Notice in .\vendor\twig\twig\src\Markup.php#35

Return type of Twig\Markup::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Deprecation Notice in .\libraries\classes\Util.php#1936

Function strftime() is deprecated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

冷情妓 2025-02-06 09:54:51

对于PHP 7.3+

编辑以下文件:config.inc.php。它可以位于/ETC/PHPMYADMIN/CONFIG.INC.PHP或/usr/share/phpmyadmin/config.inc.inc.php中

$cfg['SendErrorReports'] = 'never';

For PHP 7.3+

Edit the following file : config.inc.php. It can be located in /etc/phpmyadmin/config.inc.php or in /usr/share/phpmyadmin/config.inc.php

$cfg['SendErrorReports'] = 'never';
乖乖公主 2025-02-06 09:54:51

从PHP7.4转换为PHP8.1之后,我在Debian 11上收到了相同的错误消息。

解决问题的原因是将phpmyadmin手动升级到最新版本。

=======遵循的步骤========

备份phpmyadmin

您应该通过重命名来备份当前的phpmyadmin文件夹。

 $ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

创建一个新的phpmyadmin文件夹

$ sudo mkdir /usr/share/phpmyadmin/

目录更改

$ cd /usr/share/phpmyadmin/

下载并提取phpmyadmin

$ sudo wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

现在提取

$ sudo tar xzf phpMyAdmin-*-all-languages.tar.gz
Once extracted, list folder

$ ls

您应该看到一个新的文件夹phpmyadmin - * -

我们希望将此文件夹的内容移至/usr/share/phpmyadmin

$ sudo mv phpMyAdmin-*-all-languages/* /usr/share/phpmyadmin

/>/>/>/>/>/>/ussr/share/phpmyadmin/phpmyadmin/config.sample的副本。

$ sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php

$ sudo nano config.inc.php

$cfg['blowfish_secret'] = 'Zbwen/BEAFv:HTbqOROrqakJ;KUMIpV:'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

​>站点/phpmyadmin 检查所有错误均已清除。

===========================================

< em>您可能会在phpmyadmin /index.php上遇到此错误消息< /em>

它可能会说:

$ cfg ['tempdir'](/usr/share/phpmyadmin/tmp)无法访问。
phpmyadmin无法缓存模板,并且由于
这个。

===解决方案==

$ sudo mkdir -p /var/tmp/phpMyAdmin

$ sudo chown www-data:www-data /var/tmp/phpMyAdmin

$ sudo chmod -R 700 /var/tmp/phpMyAdmin

再次编辑config.inc.php

$ sudo nano config.inc.php

添加或替换此行

$cfg['TempDir'] = '/var/tmp/phpMyAdmin';

清理 -
现在,您可以删除tar.gz文件和空文件夹。

$ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz

而且,如果您确定您的新phpmyadmin安装正常工作,则可以删除备份文件夹。

$ sudo rm -rf /usr/share/phpmyadmin.bak

I had the same error message on Debian 11 after switching from php7.4 to php8.1.

What solved the issue was upgrading phpMyAdmin to the latest version manually.

=======Steps to followed=====

Back up phpMyAdmin

You should back up your current phpMyAdmin folder by renaming it.

 $ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

Create a new phpMyAdmin folder

$ sudo mkdir /usr/share/phpmyadmin/

Change to the directory

$ cd /usr/share/phpmyadmin/

Download and Extract phpMyAdmin

$ sudo wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

Now extract

$ sudo tar xzf phpMyAdmin-*-all-languages.tar.gz
Once extracted, list folder

$ ls

You should see a new folder phpMyAdmin-*-all-languages

We want to move the contents of this folder to /usr/share/phpmyadmin

$ sudo mv phpMyAdmin-*-all-languages/* /usr/share/phpmyadmin

Make a copy of /usr/share/phpmyadmin/config.sample.inc.php

$ sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php

Now edit the config.inc.php

$ sudo nano config.inc.php

$cfg['blowfish_secret'] = 'Zbwen/BEAFv:HTbqOROrqakJ;KUMIpV:'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

$ Ctrl+x /* to save the file */

Go to your site/phpmyadmin check all error is cleared.

=================================================

YOU MAY ENCOUNTER THIS ERROR MESSAGE ON PHPMYADMIN /INDEX.PHP

IT MAY SAY SOMETHING LIKE:

The $cfg['TempDir'] (/usr/share/phpmyadmin/tmp) is not accessible.
phpMyAdmin is not able to cache templates and will be slow because of
this.

===SOLUTION==

$ sudo mkdir -p /var/tmp/phpMyAdmin

$ sudo chown www-data:www-data /var/tmp/phpMyAdmin

$ sudo chmod -R 700 /var/tmp/phpMyAdmin

Edit the config.inc.php again

$ sudo nano config.inc.php

add or replace this line

$cfg['TempDir'] = '/var/tmp/phpMyAdmin';

Cleanup --
You can now delete the tar.gz file and the empty folder.

$ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz

And if you’re certain your new phpMyAdmin install is working correctly you can delete the backup folder.

$ sudo rm -rf /usr/share/phpmyadmin.bak
最佳男配角 2025-02-06 09:54:51

从现在开始,您可以按照这两个步骤关闭错误:

  1. open /usr/share/phpmyadmin/themes/pmahomme/layout.inc.inc.php
  2. 添加&lt;?php error_reporting(0);

请注意,这不是官方信息!

From now you can turn off errors following these two steps:

  1. Open /usr/share/phpmyadmin/themes/pmahomme/layout.inc.php
  2. Add after <?php error_reporting(0);

Please note that this is not official information!

猫性小仙女 2025-02-06 09:54:51

使用Mamp的PhpMyAdmin 5将PHP版本升级到8.1之后,我遇到了同样的问题。我只能找到一种方法来摆脱它,这要归功于此处

  • 转到您的phpmyadmin,即使它反复将折衷警告记入页面
  • 中>在您的phpmyadmin界面中的选项卡(您必须在主phpmyadmin页面中才能显示此选项卡,并且没有选择任何表 / db)
  • 选择functions < / code>,然后滚动到错误>错误>错误报告和选择切勿发送,然后单击OK保存它。完毕!

我在技术上应该与之相对应:

$ cfg ['senderrreeports'] ='nover';

,但似乎涉及其他步骤。无论如何,现在工作!

I had the same issue after upgrading my PHP Version to 8.1 using MAMP's phpmyadmin 5. I could only find out a way to get rid of it thanks to this here:

  • Go to your phpmyadmin, even if it repeatedly logs deprecation warnings into your page
  • Select the Preferences Tab in your phpmyadmin interface (you have to be in your main phpmyadmin page for this tab to show up, and not have any table / db selected)
  • Select Functions and scroll down to Error Reports and select Never send and click on OK to save it. done!

I though that this should technically correspond to this:

$cfg['SendErrorReports'] = 'never';

But as it seems, there are additional steps involved. Anyway, working now!

吾家有女初长成 2025-02-06 09:54:51

我只是使用MAMP Pro本身的标准更新功能。菜单MAMP PRO&GT;检查更新...我在更新phpmyadmin5 5.1.0 - &gt;那里安装。 5.2.0。那对我有用。

I just used the standard update function from MAMP PRO itself. Menu MAMP PRO > Check for Updates… There i Run Install on the update phpMyAdmin5 5.1.0 -> 5.2.0. That worked for me.

饮湿 2025-02-06 09:54:51
  1. 打开XAMPP控制面板。

  2. 转到Apache&gt; config&gt; phpmyadmin(config.inc.php)文件。

  3. 只需在此文件中的所有代码的下面添加此行...

      $ cfg ['sendErroreports'] ='Never';
     
  1. Open your xampp control panel.

  2. Go to apache > config > phpMyAdmin(config.inc.php) file.

  3. Just add this line in below of all code in this file...

      $cfg['SendErrorReports'] = 'never';
    
岁吢 2025-02-06 09:54:51

如果使用Wamp服务器,则可以从 apps 文件夹上的phpmyadmin new版本中放下[https://www.phpmyadmin.net/downloads/]的下载文件。然后转到别名文件夹,您必须更改
phpmyadmin.conf

别名/phpmyadmin“ d:/wamp64/apps/phpmyadmin5.2.0/” //在这里更改

&lt;目录“ d:/wamp64/apps/phpmyadmin5.2.0/”&gt; //在这里更改

,然后保存重新启动 wamp服务

if you use a wamp server then you can put down the downloaded files from [https://www.phpmyadmin.net/downloads/] of PHPMyAdmin new version on apps folder. then go to alias folder and you have to change in
phpmyadmin.conf

Alias /phpmyadmin "d:/wamp64/apps/phpmyadmin5.2.0/" //change it here

<Directory "d:/wamp64/apps/phpmyadmin5.2.0/"> //change it here

then Save and Restart wamp services

糖粟与秋泊 2025-02-06 09:54:51

打开 :
your_ip_or_domain/phpmyadmin/prefs_forms.php?form =功能,

然后将选项值(发送错误报告)放在选项上(切勿发送错误报告)。

open :
your_ip_or_domain/phpmyadmin/prefs_forms.php?form=Features

Then put the value of the option (Send error reports) on the option (Never send error reports).

旧时浪漫 2025-02-06 09:54:51

中有一些树枝控制台

ls -lha /usr/share/phpmyadmin/tmp/twig

如果一次删除

rm -R /usr/share/phpmyadmin/tmp/twig

If there are some twig consoles in

ls -lha /usr/share/phpmyadmin/tmp/twig

Delete all in one time

rm -R /usr/share/phpmyadmin/tmp/twig
凉城 2025-02-06 09:54:51

这就是我在Ubuntu-20系统上对我有用的。
我们可以在phpmyadmin设置本身中配置它。

请参考屏幕截图并观察
发送错误报告字段并将其设置为永不发送错误报告

”

This is what worked for me on my ubuntu-20 system.
We can configure it in the phpmyadmin settings itself.

Please refer the screenshot and observe the
send error reports field and set it to Never send error reports

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文