nxt_php_sapi.c (564:762f8c976ead) nxt_php_sapi.c (579:ff307638c27d)
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include "php.h"

--- 24 unchanged lines hidden (view full) ---

33# define NXT_HAVE_PHP_IGNORE_CWD 1
34# endif
35#endif
36
37static int nxt_php_startup(sapi_module_struct *sapi_module);
38static int nxt_php_send_headers(sapi_headers_struct *sapi_headers);
39static char *nxt_php_read_cookies(void);
40static void nxt_php_register_variables(zval *track_vars_array);
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include "php.h"

--- 24 unchanged lines hidden (view full) ---

33# define NXT_HAVE_PHP_IGNORE_CWD 1
34# endif
35#endif
36
37static int nxt_php_startup(sapi_module_struct *sapi_module);
38static int nxt_php_send_headers(sapi_headers_struct *sapi_headers);
39static char *nxt_php_read_cookies(void);
40static void nxt_php_register_variables(zval *track_vars_array);
41static void nxt_php_log_message(char *message
42#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
41#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
43 , int syslog_type_int
42static void nxt_php_log_message(char *message, int syslog_type_int);
43#else
44static void nxt_php_log_message(char *message);
44#endif
45#endif
45);
46
47#ifdef NXT_PHP7
48static size_t nxt_php_unbuffered_write(const char *str,
49 size_t str_length TSRMLS_DC);
50static size_t nxt_php_read_post(char *buffer, size_t count_bytes TSRMLS_DC);
51#else
52static int nxt_php_unbuffered_write(const char *str, uint str_length TSRMLS_DC);
53static int nxt_php_read_post(char *buffer, uint count_bytes TSRMLS_DC);

--- 707 unchanged lines hidden (view full) ---

761
762 NXT_PHP_SET(n.start, v);
763 }
764
765#undef NXT_PHP_SET
766}
767
768
46
47#ifdef NXT_PHP7
48static size_t nxt_php_unbuffered_write(const char *str,
49 size_t str_length TSRMLS_DC);
50static size_t nxt_php_read_post(char *buffer, size_t count_bytes TSRMLS_DC);
51#else
52static int nxt_php_unbuffered_write(const char *str, uint str_length TSRMLS_DC);
53static int nxt_php_read_post(char *buffer, uint count_bytes TSRMLS_DC);

--- 707 unchanged lines hidden (view full) ---

761
762 NXT_PHP_SET(n.start, v);
763 }
764
765#undef NXT_PHP_SET
766}
767
768
769static void
770nxt_php_log_message(char *message
771#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
769#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
772 , int syslog_type_int
770static void
771nxt_php_log_message(char *message, int syslog_type_int)
772#else
773static void
774nxt_php_log_message(char *message)
773#endif
775#endif
774)
775{
776{
776 nxt_php_run_ctx_t *ctx;
777
778 ctx = SG(server_context);
779
780 nxt_log(ctx->task, NXT_LOG_NOTICE, "php message: %s", message);
777 nxt_thread_log_error(NXT_LOG_NOTICE, "php message: %s", message);
781}
778}