diff --git a/plugins/php/conf/app_start.php b/plugins/php/conf/app_start.php
index eb5c2c8e2..97dc7a8c3 100644
--- a/plugins/php/conf/app_start.php
+++ b/plugins/php/conf/app_start.php
@@ -30,7 +30,7 @@ function app_xhprof_end() {
$run_id = $xhprof_runs->save_run($xhprof_data, 'xhprof_foo');
- $profiler_url = sprintf('http://0.0.0.0:5858/index.php?run=%s&source=xhprof_foo', $run_id);
+ $profiler_url = sprintf('http://{$LOCAL_IP}:5858/index.php?run=%s&source=xhprof_foo', $run_id);
echo "";
// echo 'Profiler output';
diff --git a/plugins/php/index.py b/plugins/php/index.py
index e98dc5692..3857cbefe 100755
--- a/plugins/php/index.py
+++ b/plugins/php/index.py
@@ -82,6 +82,7 @@ def contentReplace(content, version):
content = content.replace('{$ROOT_PATH}', mw.getRootDir())
content = content.replace('{$SERVER_PATH}', service_path)
content = content.replace('{$PHP_VERSION}', version)
+ content = content.replace('{$LOCAL_IP}', mw.getLocalIp())
if mw.isAppleSystem():
# user = mw.execShell(