Skip to content

Commit 51c2493

Browse files
committed
Requiring libs/output_data based on env var
1 parent 8316f27 commit 51c2493

File tree

37 files changed

+41
-57
lines changed

37 files changed

+41
-57
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ If you want to see current configuration, run `sudo sysctl -a`.
147147
~~~
148148
<VirtualHost *:80>
149149
DocumentRoot /home/vagrant/public
150+
SetEnv php_framework_benchmark_path /home/vagrant/public/php-framework-benchmark
150151
</VirtualHost>
151152
~~~
152153

aura-2.0/web/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
);
1717
$kernel();
1818

19-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
19+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';

bear-0.10/bootstrap/contexts/prod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
//
6666
OK: {
6767
$app->response->setResource($app->page)->render()->send();
68-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
68+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';
6969
exit(0);
7070
}
7171

bear-1.0/bootstrap/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
// representation transfer
3333
$page()->transfer($app->responder, $_SERVER);
34-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
34+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';
3535
exit(0);
3636
} catch (\Exception $e) {
3737
$app->error->handle($e, $request)->transfer();

cake-3.0/webroot/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
new Response()
3737
);
3838

39-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
39+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';

cake-3.1/webroot/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
new Response()
3737
);
3838

39-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
39+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';

ci-3.0/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,4 +291,4 @@
291291
*/
292292
require_once BASEPATH.'core/CodeIgniter.php';
293293

294-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
294+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';

cygnite-1.3/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@
5959
*/
6060
require_once CF_BOOTSTRAP.DS.'start'.EXT;
6161

62-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
62+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';

docker/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ php_5_6_4:
2020
- "9000"
2121
environment:
2222
stack: 'docker_nginx_php_5_6_4'
23+
php_framework_benchmark_path: /public
2324
working_dir: '/repo'
2425
command: "/stack/php/run-php-fpm.sh"
2526

@@ -33,6 +34,7 @@ hhvm_3_10_1:
3334
- "9000"
3435
environment:
3536
stack: 'docker_nginx_hhvm_3_10_1'
37+
php_framework_benchmark_path: /public
3638
working_dir: '/repo'
3739
command: "/stack/php/run-hhvm.sh"
3840

@@ -46,6 +48,7 @@ php_7_0_0:
4648
- "9000"
4749
environment:
4850
stack: 'docker_nginx_php_7_0_0'
51+
php_framework_benchmark_path: /public
4952
working_dir: '/repo'
5053
command: "/stack/php/run-php-fpm-7.sh"
5154

fatfree-3.5/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
$f3->run();
1111

12-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
12+
require getenv('php_framework_benchmark_path').'/libs/output_data.php';

0 commit comments

Comments
 (0)