Skip to content

Commit 7664a5f

Browse files
committed
Fix loading OPcache in the CLI server of the test on Windows
Use php_opcache.dll on Windows and pass extension_dir explicitly, like file_cache_frameless_handler.phpt.
1 parent 46b03d6 commit 7664a5f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎ext/opcache/tests/jit/restart_stub_veneers.phpt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ $ini = '-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.jit=tracing -d op
8585
. ' -d opcache.jit_max_root_traces=100000 -d opcache.jit_max_side_traces=100000'
8686
. ' -d opcache.jit_max_exit_counters=65536 -d opcache.validate_timestamps=0'
8787
. ' -d opcache.file_update_protection=0 -d error_reporting=' . (E_ALL & ~E_DEPRECATED);
88-
if (file_exists(ini_get('extension_dir') . '/opcache.' . PHP_SHLIB_SUFFIX)) {
89-
$ini .= ' -d zend_extension=opcache.' . PHP_SHLIB_SUFFIX;
88+
$ext = ini_get('extension_dir');
89+
if (file_exists($ext . DIRECTORY_SEPARATOR . (PHP_OS_FAMILY === 'Windows' ? 'php_opcache.dll' : 'opcache.so'))) {
90+
$ini .= ' -d extension_dir=' . $ext . ' -d zend_extension=opcache';
9091
}
9192
php_cli_server_start($ini);
9293

0 commit comments

Comments
 (0)