File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,13 @@ $p->setStub($stub);
33
33
unset($ p );
34
34
35
35
include "php_cli_server.inc " ;
36
- php_cli_server_start ('-d opcache.enable=1 -d opcache.enable_cli=1 -d extension=phar. ' .PHP_SHLIB_SUFFIX );
36
+
37
+ $ ini = '-d opcache.enable=1 -d opcache.enable_cli=1 ' ;
38
+ if (file_exists (ini_get ('extension_dir ' ).'/phar. ' .PHP_SHLIB_SUFFIX )) {
39
+ $ ini .= ' -d extension=phar. ' .PHP_SHLIB_SUFFIX ;
40
+ }
41
+ php_cli_server_start ($ ini );
42
+
37
43
echo file_get_contents ('http:// ' . PHP_CLI_SERVER_ADDRESS . '/issue0115_1.phar.php ' );
38
44
echo file_get_contents ('http:// ' . PHP_CLI_SERVER_ADDRESS . '/issue0115_2.phar.php ' );
39
45
?>
Original file line number Diff line number Diff line change @@ -21,7 +21,13 @@ $p->setStub($stub);
21
21
unset($ p );
22
22
23
23
include "php_cli_server.inc " ;
24
- php_cli_server_start ('-d opcache.enable=1 -d opcache.enable_cli=1 -d extension=phar. ' .PHP_SHLIB_SUFFIX );
24
+
25
+ $ ini = '-d opcache.enable=1 -d opcache.enable_cli=1 ' ;
26
+ if (file_exists (ini_get ('extension_dir ' ).'/phar. ' .PHP_SHLIB_SUFFIX )) {
27
+ $ ini .= ' -d extension=phar. ' .PHP_SHLIB_SUFFIX ;
28
+ }
29
+ php_cli_server_start ($ ini );
30
+
25
31
echo file_get_contents ('http:// ' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php ' );
26
32
echo file_get_contents ('http:// ' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php ' );
27
33
echo file_get_contents ('http:// ' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php ' );
You can’t perform that action at this time.
0 commit comments