-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[src] Copy from https://github.com/rryqszq4/ngx_php7/releases/tag/v0.…
- Loading branch information
Showing
45 changed files
with
1,242 additions
and
1,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
/** | ||
* Copyright(c) 2016-2018 rryqszq4 | ||
* | ||
* | ||
*/ | ||
/* | ||
============================================================================== | ||
Copyright (c) 2016-2019, rryqszq4 <[email protected]> | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================================================================== | ||
*/ | ||
|
||
#include "ngx_http_php_module.h" | ||
#include "ngx_http_php_request.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
/** | ||
* Copyright(c) 2016-2018 rryqszq4 | ||
* | ||
* | ||
*/ | ||
|
||
#ifndef NGX_HTTP_PHP_CORE_H | ||
#define NGX_HTTP_PHP_CORE_H | ||
/* | ||
============================================================================== | ||
Copyright (c) 2016-2019, rryqszq4 <[email protected]> | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================================================================== | ||
*/ | ||
|
||
#ifndef __NGX_HTTP_PHP_CORE_H__ | ||
#define __NGX_HTTP_PHP_CORE_H__ | ||
|
||
#include <ngx_http.h> | ||
#include <php_embed.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
/** | ||
* Copyright(c) 2016-2018 rryqszq4 | ||
* | ||
* | ||
*/ | ||
/* | ||
============================================================================== | ||
Copyright (c) 2016-2019, rryqszq4 <[email protected]> | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================================================================== | ||
*/ | ||
|
||
#include "ngx_http_php_module.h" | ||
#include "ngx_http_php_core.h" | ||
|
@@ -361,39 +383,6 @@ ngx_http_php_stack_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | |
return NGX_CONF_OK; | ||
} | ||
|
||
char * | ||
ngx_http_php_content_async_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | ||
{ | ||
ngx_http_php_main_conf_t *pmcf; | ||
ngx_http_php_loc_conf_t *plcf; | ||
ngx_str_t *value; | ||
ngx_http_php_code_t *code; | ||
|
||
if (cmd->post == NULL){ | ||
return NGX_CONF_ERROR; | ||
} | ||
|
||
pmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_php_module); | ||
plcf = conf; | ||
|
||
if (plcf->content_async_handler != NULL){ | ||
return "is duplicated"; | ||
} | ||
|
||
value = cf->args->elts; | ||
|
||
code = ngx_http_php_code_from_string(cf->pool, &value[1]); | ||
if (code == NGX_CONF_UNSET_PTR){ | ||
return NGX_CONF_ERROR; | ||
} | ||
|
||
plcf->content_async_inline_code = code; | ||
plcf->content_async_handler = cmd->post; | ||
pmcf->enabled_content_async_handler = 1; | ||
|
||
return NGX_CONF_OK; | ||
} | ||
|
||
char * | ||
ngx_http_php_log_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
/** | ||
* Copyright(c) 2016-2018 rryqszq4 | ||
* | ||
* | ||
*/ | ||
/* | ||
============================================================================== | ||
Copyright (c) 2016-2019, rryqszq4 <[email protected]> | ||
All rights reserved. | ||
#ifndef NGX_HTTP_PHP_DIRECTIVE_H | ||
#define NGX_HTTP_PHP_DIRECTIVE_H | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================================================================== | ||
*/ | ||
|
||
#ifndef __NGX_HTTP_PHP_DIRECTIVE_H__ | ||
#define __NGX_HTTP_PHP_DIRECTIVE_H__ | ||
|
||
#include <ngx_conf_file.h> | ||
#include <nginx.h> | ||
|
@@ -24,7 +46,6 @@ char *ngx_http_php_access_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | |
char *ngx_http_php_access_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | ||
char *ngx_http_php_content_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | ||
char *ngx_http_php_content_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | ||
char *ngx_http_php_content_async_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | ||
|
||
char *ngx_http_php_opcode_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | ||
char *ngx_http_php_stack_inline_phase(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
/** | ||
* Copyright(c) 2016-2018 rryqszq4 | ||
* | ||
* | ||
*/ | ||
/* | ||
============================================================================== | ||
Copyright (c) 2016-2019, rryqszq4 <[email protected]> | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================================================================== | ||
*/ | ||
|
||
//#include "ngx_php_debug.h" | ||
#include "ngx_http_php_module.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
/** | ||
* Copyright(c) 2016-2018 rryqszq4 | ||
* | ||
* | ||
*/ | ||
|
||
|
||
#ifndef NGX_HTTP_PHP_HANDLER_H | ||
#define NGX_HTTP_PHP_HANDLER_H | ||
/* | ||
============================================================================== | ||
Copyright (c) 2016-2019, rryqszq4 <[email protected]> | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================================================================== | ||
*/ | ||
|
||
#ifndef __NGX_HTTP_PHP_HANDLER_H__ | ||
#define __NGX_HTTP_PHP_HANDLER_H__ | ||
|
||
#include <nginx.h> | ||
#include <ngx_http.h> | ||
|
@@ -38,13 +59,6 @@ ngx_int_t ngx_http_php_opcode_inline_handler(ngx_http_request_t *r); | |
ngx_int_t ngx_http_php_stack_handler(ngx_http_request_t *r); | ||
ngx_int_t ngx_http_php_stack_inline_handler(ngx_http_request_t *r); | ||
|
||
/*ngx_int_t ngx_http_php_content_async_handler(ngx_http_request_t *r); | ||
ngx_int_t ngx_http_php_content_async_inline_handler(ngx_http_request_t *r); | ||
void *ngx_http_php_async_inline_thread(void *arg); | ||
ngx_int_t ngx_http_php_content_sync_inline_handler(ngx_http_request_t *r); | ||
void *ngx_http_php_sync_inline_thread(void *arg);*/ | ||
|
||
ngx_int_t ngx_http_php_log_handler(ngx_http_request_t *r); | ||
ngx_int_t ngx_http_php_log_file_handler(ngx_http_request_t *r); | ||
ngx_int_t ngx_http_php_log_inline_handler(ngx_http_request_t *r); | ||
|
Oops, something went wrong.