Skip to content

Commit a3f9b92

Browse files
committed
fix running the server from command line
1 parent 7562317 commit a3f9b92

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/server.inc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
function memcached_server_start($code = 'server.php', $host = "127.0.0.1", $port = 3434) {
3-
$php_executable = getenv('TEST_PHP_EXECUTABLE') ?? PHP_BINARY;
4-
$php_args = getenv('TEST_PHP_ARGS') ?? '';
3+
$php_executable = getenv('TEST_PHP_EXECUTABLE') ?: PHP_BINARY;
4+
$php_args = getenv('TEST_PHP_ARGS') ?: '';
55

66
$descriptorspec = array(
77
0 => STDIN,
@@ -29,7 +29,7 @@ function memcached_server_start($code = 'server.php', $host = "127.0.0.1", $port
2929
$fp = @fsockopen($host, $port);
3030
// Failure, the server is no longer running
3131
if (!($status && $status['running'])) {
32-
$error = "Server is not running\n";
32+
$error = "Server is not running {$status['command']}\n";
3333
break;
3434
}
3535
// Success, Connected to servers
@@ -75,4 +75,3 @@ function memcached_server_stop($handle) {
7575
}
7676
return $success;
7777
}
78-

0 commit comments

Comments
 (0)