diff --git a/hphp/runtime/base/program-functions.cpp b/hphp/runtime/base/program-functions.cpp index 616c4ad54fb74..7e5d1bf9beb38 100644 --- a/hphp/runtime/base/program-functions.cpp +++ b/hphp/runtime/base/program-functions.cpp @@ -596,7 +596,7 @@ void execute_command_line_begin(int argc, char **argv, int xhprof, serverArr.set(s_argc, php_global(s_argc)); serverArr.set(s_PWD, g_context->getCwd()); char hostname[1024]; - if (!gethostname(hostname, 1024)) { + if (!RuntimeOption::ClientExecutionMode() && !gethostname(hostname, 1024)) { serverArr.set(s_HOSTNAME, String(hostname, CopyString)); }