|
10 | 10 | # Author : Sergey Dryabzhinsky #
|
11 | 11 | # Company : Rusoft Ltd, Russia #
|
12 | 12 | # Date : May 18, 2017 #
|
13 |
| -# version : 1.0.18 # |
| 13 | +# version : 1.0.19 # |
14 | 14 | # License : Creative Commons CC-BY license #
|
15 | 15 | # Website : https://github.com/rusoft/php-simple-benchmark-script #
|
16 | 16 | # Website : https://git.rusoft.ru/open-source/php-simple-benchmark-script #
|
17 | 17 | # #
|
18 | 18 | ################################################################################
|
19 | 19 | */
|
20 | 20 |
|
21 |
| -$scriptVersion = '1.0.18'; |
| 21 | +$scriptVersion = '1.0.19'; |
22 | 22 |
|
23 | 23 | // Used in hacks/fixes checks
|
24 | 24 | $phpversion = explode('.', PHP_VERSION);
|
|
125 | 125 | set_time_limit($defaultTimeLimit);
|
126 | 126 | @ini_set('memory_limit', $defaultMemoryLimit . 'M');
|
127 | 127 |
|
| 128 | +// Force output flushing, like in CLI |
| 129 | +// May help with proxy-pass apache-nginx |
| 130 | +@ini_set('output_buffering', 0); |
| 131 | +@ini_set('implicit_flush', 1); |
| 132 | +ob_implicit_flush(1); |
| 133 | +// Special for nginx |
| 134 | +header('X-Accel-Buffering: no'); |
| 135 | + |
128 | 136 | /** ------------------------------- Main Constants ------------------------------- */
|
129 | 137 |
|
130 | 138 | $line = str_pad("-", 91, "-");
|
@@ -938,7 +946,11 @@ function test_17_2_Loop_Undefined_Access()
|
938 | 946 | }
|
939 | 947 |
|
940 | 948 | if ((int)$phpversion[0] >= 5) {
|
941 |
| - include_once 'php5.inc'; |
| 949 | + if (is_file('php5.inc')) { |
| 950 | + include_once 'php5.inc'; |
| 951 | + } else { |
| 952 | + print("<pre>\n<<< WARNING >>>\nMissing file 'php5.inc' with try/Exception/catch loop test!\n It matters only for php version 5+.\n</pre>"); |
| 953 | + } |
942 | 954 | }
|
943 | 955 |
|
944 | 956 | /** ---------------------------------- Common code -------------------------------------------- */
|
|
0 commit comments