questionier
V2EX  ›  问与答

php7&Adminer

  •  
  •   questionier · Dec 4, 2015 · 3370 views
    This topic created in 3845 days ago, the information mentioned may be changed or developed.

    刚在 windows 上尝鲜升级了 php7 ,运行 wordpres 没问题;然后运行 adminer 就出现了下面的报错,求 V 友帮忙看一下是怎么回事啊。。。。。。。。。。。
    “ PHP Warning: Declaration of Min_DB::connect($N, $V, $G) should be compatible with mysqli::connect($host = NULL, $user = NULL, $password = NULL, $database = NULL, $port = NULL, $socket = NULL) in C:\inetpub\wwwroot\adminer.php on line 1171 ”

    9 replies    2015-12-04 12:12:37 +08:00
    fising
        1
    fising  
       Dec 4, 2015
    提示信息不是很清楚吗,这个在 PHP 5 也应该会 Warning 吧?
    questionier
        2
    questionier  
    OP
       Dec 4, 2015
    @fising 不会,在 5 里面运行很好。。。。。。。。
    fising
        3
    fising  
       Dec 4, 2015
    @questionier 错误报告级别一样吗
    questionier
        4
    questionier  
    OP
       Dec 4, 2015
    @fising 我是新手,不太懂 php 。在 php5 里面运行没有问题
    cevincheung
        5
    cevincheung  
       Dec 4, 2015
    PHP7 不再支持 mysql_xxxxx 函数系列。需要使用 MySQLi 或 PDO&MYSQL 代替。
    barbery
        6
    barbery  
       Dec 4, 2015
    晕。。。这个提示的意思是,你 Min_DB 继承了 mysqli ,重载了 connect 方法,但是却没定义好相同的参数。。。。你只要改下 Min_DB::connect 方法,把参数和 mysqli 的参数对齐就好了
    jacy
        7
    jacy  
       Dec 4, 2015
    7 不推荐 mysql 了,但只是 warning 应该可以工作,等 adminer 更新或者隐藏报错,动手能力强的话自己改源码也行
    questionier
        8
    questionier  
    OP
       Dec 4, 2015 via Android
    @barbery @jacy 哦,好吧,谢谢
    fising
        9
    fising  
       Dec 4, 2015
    这和 mysql 接口有什么关系?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2934 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 12:52 · PVG 20:52 · LAX 05:52 · JFK 08:52
    ♥ Do have faith in what you're doing.