Browse Source

Try to fix workerman by specifying the db host differently (#3160)

It's not clear this is why workerman failed in the current run on Server
Central -- the logs don't say anything -- but workerman was also failing
in a local test, and making this change fixed it.
Michael Hixson 7 years ago
parent
commit
77f6fa9931
1 changed files with 1 additions and 1 deletions
  1. 1 1
      frameworks/PHP/workerman/server.php

+ 1 - 1
frameworks/PHP/workerman/server.php

@@ -15,7 +15,7 @@ $http_worker = new Worker('http://0.0.0.0:8080');
 $http_worker->count = get_processor_cores_number() * 2 || 8;
 $http_worker->count = get_processor_cores_number() * 2 || 8;
 $http_worker->onMessage = function($connection, $data)
 $http_worker->onMessage = function($connection, $data)
 {
 {
-  $pdo = new PDO('mysql:host='.(isset($_ENV['DBHOST'])?$_ENV['DBHOST']:'127.0.0.1').';dbname=hello_world;charset=utf8', 
+  $pdo = new PDO('mysql:host=TFB-database;dbname=hello_world;charset=utf8',
   'benchmarkdbuser', 'benchmarkdbpass', array(
   'benchmarkdbuser', 'benchmarkdbpass', array(
     PDO::ATTR_PERSISTENT => true
     PDO::ATTR_PERSISTENT => true
   ));
   ));