diff --git a/plugins/php/conf/app_start.php b/plugins/php/conf/app_start.php
index 8a21a7cd4..58f139d30 100644
--- a/plugins/php/conf/app_start.php
+++ b/plugins/php/conf/app_start.php
@@ -1,7 +1,7 @@
save_run($xhprof_data, 'xhprof_foo');
+ $run_id = $xhprof_runs->save_run($xhprof_data, 'xhprof_foo');
- $profiler_url = sprintf('http://{$LOCAL_IP}:5858/index.php?run=%s&source=xhprof_foo', $run_id);
- echo "";
- // echo 'Profiler output';
+ $profiler_url = sprintf('http://{$LOCAL_IP}:5858/index.php?run=%s&source=xhprof_foo', $run_id);
+ echo "";
+ // echo 'Profiler output';
}
if (extension_loaded('xhprof')
- && isset($_GET[XHProf_Name]) && $_GET[XHProf_Name] == 'ok' &&
- (!in_array($_SERVER['SCRIPT_NAME'], array('/xhprof_html/callgraph.php',
- '/xhprof_html/index.php')))) {
- app_xhprof_start();
- include_once $_SERVER['SCRIPT_FILENAME'];
- app_xhprof_end();
- exit;
+ && isset($_GET[XHProf_Name]) && $_GET[XHProf_Name] == 'ok' &&
+ (! in_array($_SERVER['SCRIPT_NAME'], ['/xhprof_html/callgraph.php',
+ '/xhprof_html/index.php']))) {
+ app_xhprof_start();
+ register_shutdown_function('app_xhprof_end');
+ include_once $_SERVER['SCRIPT_FILENAME'];
}
?>
diff --git a/plugins/xhprof/index.py b/plugins/xhprof/index.py
index d309a8ca2..ec3b5d645 100755
--- a/plugins/xhprof/index.py
+++ b/plugins/xhprof/index.py
@@ -165,7 +165,6 @@ def setPhpVer():
mw.writeFile(file_run, centent)
mw.restartWeb()
-
return 'ok'