Hi.
I use local with php 8.0.0 and I don’t face any problem.
In line 1253, the 5th argument is:
(is_numeric($gg)?$gg:ini_get("mysqli.default_port"))
Can you try to do debugging in order to solve the problem?
Change line 1253 with this one:
connect($M="",$V="",$F="",$j=null,$gg=null,$wh=null){global$b;mysqli_report(MYSQLI_REPORT_OFF);list($Fd,$gg)=explode(":",$M,2);$Eh=$b->connectSsl();if($Eh)$this->ssl_set($Eh['key'],$Eh['cert'],$Eh['ca'],'','');var_dump($gg);var_dump(ini_get("mysqli.default_port"));die;$I=@$this->real_connect(($M!=""?$Fd:ini_get("mysqli.default_host")),($M.$V!=""?$V:ini_get("mysqli.default_user")),($M.$V.$F!=""?$F:ini_get("mysqli.default_pw")),$j,(is_numeric($gg)?$gg:ini_get("mysqli.default_port")),(!is_numeric($gg)?$gg:$wh),($Eh?64:0));$this->options(MYSQLI_OPT_LOCAL_INFILE,false);return$I;}function
and share to me the var_dumps.
Thanks 🙂
Hi to @pexlechris
Thank you for your cooperation, the result was this line below in my screen instead of wp_die().
NULL string(0) ""
(The URL is http://localhost:10110/wp-adminer?username=&db=local)
PS
I also tried the same with PHP 8.0.0, but I got the same error.
ini_get("mysqli.default_port")
shouldn’t be empty string!! The problem is with the configuration of your installation.
You can add the mysqli.default_port yourself in the php ini settings.
Example here:
https://stackoverflow.com/questions/12394104/php-connection-variables-ini-file#answer-12395483
@pexlechris, Thank you for your support!
First of all, I’ve checked the result of phpinfo(), and the value of mysqli.default_port was not set.
I am using version 6.6.0 of Local (by flywheel), and newly made Local’s site via default flow is seemingly using UNIX Socket to connect to MySQL(*) instead of TCP/IP. That’s why mysqli.default_port is not set, I assume. But still the Local’s built-in Adminer is working fine…
*I paste the execution result of command “mysql> status” below.
mysql Ver 8.0.16 for macos10.14 on x86_64 (MySQL Community Server - GPL)
Connection id: 157
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.16 MySQL Community Server - GPL
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /Users/.../Library/Application Support/Local/run/.../mysql/mysqld.sock
Uptime: 2 days 1 hour 33 min 33 sec
Maybe I have to find a way to change the method of connection to TCP/IP from UNIX Socket first…
PS
I’ve tried your plugin on another WordPress which uses TCP/IP to connect to MySQL, and It worked fine with no additional configuration to php.ini.
Yes, my Plugin works with classic installations. Somethimg goes wrong with yours and I cannot help you because it is issue of server or Adminer configuration.
Of tthe issue is from Adminer you can open a support ticket in Adminer’s Repository.
Thanks for using my Plugin