diff --git a/plugins/php-apt/conf/app_start.php b/plugins/php-apt/conf/app_start.php
index 8a21a7cd4..5bff93d38 100644
--- a/plugins/php-apt/conf/app_start.php
+++ b/plugins/php-apt/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();
+ include_once $_SERVER['SCRIPT_FILENAME'];
+ app_xhprof_end();
+ exit;
}
?>
diff --git a/plugins/php-yum/conf/app_start.php b/plugins/php-yum/conf/app_start.php
index 8a21a7cd4..5bff93d38 100644
--- a/plugins/php-yum/conf/app_start.php
+++ b/plugins/php-yum/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();
+ include_once $_SERVER['SCRIPT_FILENAME'];
+ app_xhprof_end();
+ exit;
}
?>