Skip to content

Commit a2cc8a1

Browse files
committed
fix SAPI tests
1 parent f4fc1b4 commit a2cc8a1

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

sapi/cgi/cgi_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,10 @@ consult the installation file that came with this distribution, or visit \n\
20532053
sigaction(SIGQUIT, &old_quit, 0);
20542054
sigaction(SIGINT, &old_int, 0);
20552055
zend_signal_init();
2056+
2057+
#if ZEND_TIMER
2058+
zend_timer_create();
2059+
#endif
20562060
break;
20572061
case -1:
20582062
perror("php (pre-forking)");

sapi/cli/php_cli_server.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#include "zend_execute.h"
6565
#include "zend_highlight.h"
6666
#include "zend_exceptions.h"
67+
#include "zend_timer.h"
6768

6869
#include "php_getopt.h"
6970

@@ -2400,6 +2401,10 @@ static void php_cli_server_startup_workers(void) {
24002401
} else if (pid == SUCCESS) {
24012402
return;
24022403
} else {
2404+
#if ZEND_TIMER
2405+
zend_timer_create();
2406+
#endif
2407+
24032408
php_cli_server_workers[php_cli_server_worker] = pid;
24042409
}
24052410
}

sapi/fpm/fpm/fpm_php.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include "php_ini.h"
1212
#include "ext/standard/dl.h"
1313

14+
#include "zend_timer.h"
15+
1416
#include "fastcgi.h"
1517

1618
#include "fpm.h"
@@ -215,6 +217,10 @@ int fpm_php_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
215217
return -1;
216218
}
217219

220+
#if ZEND_TIMER
221+
zend_timer_create();
222+
#endif
223+
218224
if (wp->limit_extensions) {
219225
/* Take ownership of limit_extensions. */
220226
limit_extensions = wp->limit_extensions;

0 commit comments

Comments
 (0)