Skip to content

Commit 6163bb8

Browse files
Wulfklauemichaelhixson
authored andcommitted
Fetch host by IP instead of domain name (#3799)
1 parent 4a79d82 commit 6163bb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frameworks/PHP/php/swoole-server.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
case "/db":
2121
$db = new Swoole\Coroutine\Mysql;
2222
$server = [
23-
'host' => 'tfb-database',
23+
'host' => co::gethostbyname('tfb-database'),
2424
'user' => 'benchmarkdbuser',
2525
'password' => 'benchmarkdbpass',
2626
'database' => 'hello_world'
@@ -59,7 +59,7 @@
5959
case "/fortunes":
6060
$db = new Swoole\Coroutine\Mysql;
6161
$server = [
62-
'host' => 'tfb-database',
62+
'host' => co::gethostbyname('tfb-database'),
6363
'user' => 'benchmarkdbuser',
6464
'password' => 'benchmarkdbpass',
6565
'database' => 'hello_world' //;charset=utf8
@@ -87,7 +87,7 @@
8787
case "/updates":
8888
$db = new Swoole\Coroutine\Mysql;
8989
$server = [
90-
'host' => 'tfb-database',
90+
'host' => co::gethostbyname('tfb-database'),
9191
'user' => 'benchmarkdbuser',
9292
'password' => 'benchmarkdbpass',
9393
'database' => 'hello_world'

0 commit comments

Comments
 (0)