草庐IT

phpMyAdmin:PHP fatal error - 无法重新声明 PMA_checkLink()

coder 2023-10-23 原文

我最近开始在尝试访问托管的 phpMyAdmin 时遇到问题。我在尝试访问它时收到 500 内部服务器错误,正如预期的那样,我的浏览器中除了空白页面外什么也没有。

我查看了 phpMyAdmin 的错误日志并注意到出现了以下错误:

PHP Fatal error:  Call to undefined function PMA_sanitize() in /usr/share/phpMyAdmin/libraries/Message.class.php on line 541

首先,我重新安装了 phpMyAdmin,在此之后,在我再次遇到同样的问题之前能够正常访问它一段时间。

我浏览了网络并发现了以下博客 here有可能解决这个问题。我按照博客的建议进行操作并添加了以下内容:

require_once('./libraries/sanitizing.lib.php');

在以下文件的顶部:

/usr/share/phpMyAdmin/libraries/Message.class.php

这工作了一段时间,但随后出现另一个 500 内部服务器错误。所以我再次检查错误日志并收到以下错误消息:

PHP Fatal error:  Cannot redeclare PMA_checkLink() (previously declared in /usr/share/phpMyAdmin/libraries/sanitizing.lib.php:15) in /usr/share/phpMyAdmin/libraries/sanitizing.lib.php on line 35

除了这些 fatal error 之外,我还收到以下警告消息,但不确定这些是否与问题有关:

PHP Warning:  Unknown: Unable to allocate memory for pool. in Unknown on line 0

PHP Warning:  require_once(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/index.php on line 13

PHP Warning:  require(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/libraries/common.inc.php on line 52

PHP Warning:  require_once(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/libraries/Error_Handler.class.php on line 12

PHP Warning:  require_once(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/libraries/Error.class.php on line 12

我正在运行一个专用的 Centos 6 服务器,PHP 5.3.3 版、Apache 2.2.15 版、mysql 5.1.61 版和 phpMyAdmin 3.5.7 版

如果有人能阐明这一点,那就太好了!

最佳答案

require_once(): Unable to allocate memory for pool. 意味着没有足够的内存来包含一些来自 PhpMyAdmin 的声明文件。

这些文件没有被包含,它们包含的定义没有被加载。因此,您的第一个错误是 Call to undefined function PMA_sanitize()

您链接到的博客文章建议在可疑位置添加包含,导致您在不应包含的地方包含一些定义文件。因此你的第二个错误 Cannot redeclare PMA_checkLink()

如果我是你,我会回滚 PhpMyAdmin 代码中的所有更改并尝试解决第一个问题。 This question可能会为您提供正确的程序。

关于phpMyAdmin:PHP fatal error - 无法重新声明 PMA_checkLink(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16035625/

有关phpMyAdmin:PHP fatal error - 无法重新声明 PMA_checkLink()的更多相关文章

  1. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  2. ruby-on-rails - 无法使用 Rails 3.2 创建插件? - 2

    我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby​​1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在

  3. ruby - 无法运行 Rails 2.x 应用程序 - 2

    我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby​​:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r

  4. ruby - 如何在续集中重新加载表模式? - 2

    鉴于我有以下迁移:Sequel.migrationdoupdoalter_table:usersdoadd_column:is_admin,:default=>falseend#SequelrunsaDESCRIBEtablestatement,whenthemodelisloaded.#Atthispoint,itdoesnotknowthatusershaveais_adminflag.#Soitfails.@user=User.find(:email=>"admin@fancy-startup.example")@user.is_admin=true@user.save!ende

  5. ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错) - 2

    我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

  6. ruby - 无法让 RSpec 工作—— 'require' : cannot load such file - 2

    我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳

  7. ruby-on-rails - active_admin 目录中的常量警告重新声明 - 2

    我正在使用active_admin,我在Rails3应用程序的应用程序中有一个目录管理,其中包含模型和页面的声明。时不时地我也有一个类,当那个类有一个常量时,就像这样:classFooBAR="bar"end然后,我在每个必须在我的Rails应用程序中重新加载一些代码的请求中收到此警告:/Users/pupeno/helloworld/app/admin/billing.rb:12:warning:alreadyinitializedconstantBAR知道发生了什么以及如何避免这些警告吗? 最佳答案 在纯Ruby中:classA

  8. ruby - 无法覆盖 irb 中的 to_s - 2

    我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)

  9. ruby - 无法在 60 秒内获得稳定的 Firefox 连接 (127.0.0.1 :7055) - 2

    我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类

  10. ruby - 安装 Ruby 时遇到问题(无法下载资源 "readline--patch") - 2

    当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub

随机推荐