RE: [PHP-DEV] Register Shutdown Function for Apache
Thanks Jani. I'll work on getting the patch working on HEAD and PHP_4_3 this afternoon. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jani Taskinen Sent: Thursday, February 13, 2003 2:49 AM To: Brian Moon Cc: Joseph Tate; Php-Dev List Subject: Re: [PHP-DEV] Register Shutdown Function for Apache There is now 'HAVE_APACHE' defined when you configure with apache. (dso or static) --Jani On Tue, 11 Feb 2003, Brian Moon wrote: Jani, are you volunteering to add it? If so, please do so at your earliest convience. Brian Moon dealnews.com - Original Message - From: Jani Taskinen [EMAIL PROTECTED] To: Joseph Tate [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 10, 2003 6:16 PM Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | | If you need a define for it, we can add one..? | | --Jani | | | On Mon, 10 Feb 2003, Joseph Tate wrote: | | Well, to me, calling the code that flushes the headers and the output | buffers twice doesn't kill us. Unless someone can come up with a better way | to not call these two functions in main/main.c::php_request_shutdown, the | patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not | acceptable. | | Joseph | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Monday, February 03, 2003 5:30 PM | To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real | descriptive, but seems to be unique to the Apache sapi. | | Brian Moon | dealnews.com | | | - Original Message - | From: Joseph Tate [EMAIL PROTECTED] | To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; | [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List [EMAIL PROTECTED] | Sent: Monday, February 03, 2003 3:45 PM | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | | Here is an updated patch which copies a few of the methods from | | main/main.c::php_request_shutdown to | | sapi/apache/sapi_apache.c::apache_php_module_main. This has | flushed both | | the headers and output buffers in my two test scripts. Now I need to | figure | | out a way to make sure these don't get called in | | main/main.c::php_request_shutdown on Apache systems. Any pointers on | this? | | Is there a handy #define that I can use if configure is | called --with-apxs? | | | | Joseph | | | | P.S. The two test scripts are: | | | | ?PHP | | header('Location: http://www.mi-corporation.com'); | | exit(); | | ? | | | | and | | | | ?PHP | | ob_begin(); | | phpinfo(); | | ? | | | | -Original Message- | | From: Brian Moon [mailto:[EMAIL PROTECTED]] | | Sent: Tuesday, January 28, 2003 5:50 PM | | To: [EMAIL PROTECTED]; Joseph Tate | | Cc: Php-Dev List; PHP Group | | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | Give me a patch and I will tell you. ;) | | | | Brian Moon | | dealnews.com | | | | | | - Original Message - | | From: Zeev Suraski [EMAIL PROTECTED] | | To: Joseph Tate [EMAIL PROTECTED] | | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | | Sent: Tuesday, January 28, 2003 4:03 PM | | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | | apache_php_module_main after calling the normal | | register_shutdown_functions? | | | | | | Yeah, something along these lines. | | | | | | What else might have problems? | | | | | | Might is a powerful word :) | | | | | | Zeev | | | | | | | | | | | | | | | -- | | PHP Development Mailing List http://www.php.net/ | | To unsubscribe, visit: http://www.php.net/unsub.php | | | | | | | | | | | | | | | | -- | - For Sale! - | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | -- - For Sale! - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Register Shutdown Function for Apache
There is now 'HAVE_APACHE' defined when you configure with apache. (dso or static) --Jani On Tue, 11 Feb 2003, Brian Moon wrote: Jani, are you volunteering to add it? If so, please do so at your earliest convience. Brian Moon dealnews.com - Original Message - From: Jani Taskinen [EMAIL PROTECTED] To: Joseph Tate [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 10, 2003 6:16 PM Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | | If you need a define for it, we can add one..? | | --Jani | | | On Mon, 10 Feb 2003, Joseph Tate wrote: | | Well, to me, calling the code that flushes the headers and the output | buffers twice doesn't kill us. Unless someone can come up with a better way | to not call these two functions in main/main.c::php_request_shutdown, the | patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not | acceptable. | | Joseph | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Monday, February 03, 2003 5:30 PM | To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real | descriptive, but seems to be unique to the Apache sapi. | | Brian Moon | dealnews.com | | | - Original Message - | From: Joseph Tate [EMAIL PROTECTED] | To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; | [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List [EMAIL PROTECTED] | Sent: Monday, February 03, 2003 3:45 PM | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | | Here is an updated patch which copies a few of the methods from | | main/main.c::php_request_shutdown to | | sapi/apache/sapi_apache.c::apache_php_module_main. This has | flushed both | | the headers and output buffers in my two test scripts. Now I need to | figure | | out a way to make sure these don't get called in | | main/main.c::php_request_shutdown on Apache systems. Any pointers on | this? | | Is there a handy #define that I can use if configure is | called --with-apxs? | | | | Joseph | | | | P.S. The two test scripts are: | | | | ?PHP | | header('Location: http://www.mi-corporation.com'); | | exit(); | | ? | | | | and | | | | ?PHP | | ob_begin(); | | phpinfo(); | | ? | | | | -Original Message- | | From: Brian Moon [mailto:[EMAIL PROTECTED]] | | Sent: Tuesday, January 28, 2003 5:50 PM | | To: [EMAIL PROTECTED]; Joseph Tate | | Cc: Php-Dev List; PHP Group | | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | Give me a patch and I will tell you. ;) | | | | Brian Moon | | dealnews.com | | | | | | - Original Message - | | From: Zeev Suraski [EMAIL PROTECTED] | | To: Joseph Tate [EMAIL PROTECTED] | | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | | Sent: Tuesday, January 28, 2003 4:03 PM | | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | | apache_php_module_main after calling the normal | | register_shutdown_functions? | | | | | | Yeah, something along these lines. | | | | | | What else might have problems? | | | | | | Might is a powerful word :) | | | | | | Zeev | | | | | | | | | | | | | | | -- | | PHP Development Mailing List http://www.php.net/ | | To unsubscribe, visit: http://www.php.net/unsub.php | | | | | | | | | | | | | | | | -- | - For Sale! - | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | -- - For Sale! - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Register Shutdown Function for Apache
I think it's reached that stage. Something like HAVE_APXS that's defined when configure is called --with-apxs. That'd be great. Joseph -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jani Taskinen Sent: Monday, February 10, 2003 7:16 PM To: Joseph Tate Cc: Php-Dev List Subject: RE: [PHP-DEV] Register Shutdown Function for Apache If you need a define for it, we can add one..? --Jani On Mon, 10 Feb 2003, Joseph Tate wrote: Well, to me, calling the code that flushes the headers and the output buffers twice doesn't kill us. Unless someone can come up with a better way to not call these two functions in main/main.c::php_request_shutdown, the patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not acceptable. Joseph -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 5:30 PM To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List Subject: Re: [PHP-DEV] Register Shutdown Function for Apache Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real descriptive, but seems to be unique to the Apache sapi. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 03, 2003 3:45 PM Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | Here is an updated patch which copies a few of the methods from | main/main.c::php_request_shutdown to | sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both | the headers and output buffers in my two test scripts. Now I need to figure | out a way to make sure these don't get called in | main/main.c::php_request_shutdown on Apache systems. Any pointers on this? | Is there a handy #define that I can use if configure is called --with-apxs? | | Joseph | | P.S. The two test scripts are: | | ?PHP | header('Location: http://www.mi-corporation.com'); | exit(); | ? | | and | | ?PHP | ob_begin(); | phpinfo(); | ? | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, January 28, 2003 5:50 PM | To: [EMAIL PROTECTED]; Joseph Tate | Cc: Php-Dev List; PHP Group | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | Give me a patch and I will tell you. ;) | | Brian Moon | dealnews.com | | | - Original Message - | From: Zeev Suraski [EMAIL PROTECTED] | To: Joseph Tate [EMAIL PROTECTED] | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | Sent: Tuesday, January 28, 2003 4:03 PM | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | apache_php_module_main after calling the normal | register_shutdown_functions? | | | | Yeah, something along these lines. | | | | What else might have problems? | | | | Might is a powerful word :) | | | | Zeev | | | | | | | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | | -- - For Sale! - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Register Shutdown Function for Apache
Well, it is not just apxs is it? The same would be true if --with-apache was used. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Jani Taskinen [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Tuesday, February 11, 2003 9:04 AM Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | I think it's reached that stage. Something like HAVE_APXS that's defined | when configure is called --with-apxs. That'd be great. | | Joseph | | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On | Behalf Of Jani Taskinen | Sent: Monday, February 10, 2003 7:16 PM | To: Joseph Tate | Cc: Php-Dev List | Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | | | | If you need a define for it, we can add one..? | | --Jani | | | On Mon, 10 Feb 2003, Joseph Tate wrote: | | Well, to me, calling the code that flushes the headers and the output | buffers twice doesn't kill us. Unless someone can come up with | a better way | to not call these two functions in main/main.c::php_request_shutdown, the | patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not | acceptable. | | Joseph | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Monday, February 03, 2003 5:30 PM | To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real | descriptive, but seems to be unique to the Apache sapi. | | Brian Moon | dealnews.com | | | - Original Message - | From: Joseph Tate [EMAIL PROTECTED] | To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; | [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List [EMAIL PROTECTED] | Sent: Monday, February 03, 2003 3:45 PM | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | | Here is an updated patch which copies a few of the methods from | | main/main.c::php_request_shutdown to | | sapi/apache/sapi_apache.c::apache_php_module_main. This has | flushed both | | the headers and output buffers in my two test scripts. Now I need to | figure | | out a way to make sure these don't get called in | | main/main.c::php_request_shutdown on Apache systems. Any pointers on | this? | | Is there a handy #define that I can use if configure is | called --with-apxs? | | | | Joseph | | | | P.S. The two test scripts are: | | | | ?PHP | | header('Location: http://www.mi-corporation.com'); | | exit(); | | ? | | | | and | | | | ?PHP | | ob_begin(); | | phpinfo(); | | ? | | | | -Original Message- | | From: Brian Moon [mailto:[EMAIL PROTECTED]] | | Sent: Tuesday, January 28, 2003 5:50 PM | | To: [EMAIL PROTECTED]; Joseph Tate | | Cc: Php-Dev List; PHP Group | | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | Give me a patch and I will tell you. ;) | | | | Brian Moon | | dealnews.com | | | | | | - Original Message - | | From: Zeev Suraski [EMAIL PROTECTED] | | To: Joseph Tate [EMAIL PROTECTED] | | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | | Sent: Tuesday, January 28, 2003 4:03 PM | | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | | apache_php_module_main after calling the normal | | register_shutdown_functions? | | | | | | Yeah, something along these lines. | | | | | | What else might have problems? | | | | | | Might is a powerful word :) | | | | | | Zeev | | | | | | | | | | | | | | | -- | | PHP Development Mailing List http://www.php.net/ | | To unsubscribe, visit: http://www.php.net/unsub.php | | | | | | | | | | | | | | | | -- | - For Sale! - | | | | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Register Shutdown Function for Apache
You're right. I suppose both --with-apache and --with-apxs will have to define HAVE_APACHE or something similar. -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 11:14 AM To: Joseph Tate; Jani Taskinen Cc: Php-Dev List Subject: Re: [PHP-DEV] Register Shutdown Function for Apache Well, it is not just apxs is it? The same would be true if --with-apache was used. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Jani Taskinen [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Tuesday, February 11, 2003 9:04 AM Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | I think it's reached that stage. Something like HAVE_APXS that's defined | when configure is called --with-apxs. That'd be great. | | Joseph | | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On | Behalf Of Jani Taskinen | Sent: Monday, February 10, 2003 7:16 PM | To: Joseph Tate | Cc: Php-Dev List | Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | | | | If you need a define for it, we can add one..? | | --Jani | | | On Mon, 10 Feb 2003, Joseph Tate wrote: | | Well, to me, calling the code that flushes the headers and the output | buffers twice doesn't kill us. Unless someone can come up with | a better way | to not call these two functions in main/main.c::php_request_shutdown, the | patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not | acceptable. | | Joseph | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Monday, February 03, 2003 5:30 PM | To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real | descriptive, but seems to be unique to the Apache sapi. | | Brian Moon | dealnews.com | | | - Original Message - | From: Joseph Tate [EMAIL PROTECTED] | To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; | [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List [EMAIL PROTECTED] | Sent: Monday, February 03, 2003 3:45 PM | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | | Here is an updated patch which copies a few of the methods from | | main/main.c::php_request_shutdown to | | sapi/apache/sapi_apache.c::apache_php_module_main. This has | flushed both | | the headers and output buffers in my two test scripts. Now I need to | figure | | out a way to make sure these don't get called in | | main/main.c::php_request_shutdown on Apache systems. Any pointers on | this? | | Is there a handy #define that I can use if configure is | called --with-apxs? | | | | Joseph | | | | P.S. The two test scripts are: | | | | ?PHP | | header('Location: http://www.mi-corporation.com'); | | exit(); | | ? | | | | and | | | | ?PHP | | ob_begin(); | | phpinfo(); | | ? | | | | -Original Message- | | From: Brian Moon [mailto:[EMAIL PROTECTED]] | | Sent: Tuesday, January 28, 2003 5:50 PM | | To: [EMAIL PROTECTED]; Joseph Tate | | Cc: Php-Dev List; PHP Group | | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | Give me a patch and I will tell you. ;) | | | | Brian Moon | | dealnews.com | | | | | | - Original Message - | | From: Zeev Suraski [EMAIL PROTECTED] | | To: Joseph Tate [EMAIL PROTECTED] | | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | | Sent: Tuesday, January 28, 2003 4:03 PM | | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | | apache_php_module_main after calling the normal | | register_shutdown_functions? | | | | | | Yeah, something along these lines. | | | | | | What else might have problems? | | | | | | Might is a powerful word :) | | | | | | Zeev | | | | | | | | | | | | | | | -- | | PHP Development Mailing List http://www.php.net/ | | To unsubscribe, visit: http://www.php.net/unsub.php | | | | | | | | | | | | | | | | -- | - For Sale! - | | | | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe
Re: [PHP-DEV] Register Shutdown Function for Apache
Hey guys, Just to announce that I put the patch.diff for strip_tags() in another server. Here is the new link: http://www.3dogs.hpg.ig.com.br/patch.diff If there's still any interest in applying it, feel free whoever is responsible for! Regards, Fabricio Olivetti de Franca -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Register Shutdown Function for Apache
Jani, are you volunteering to add it? If so, please do so at your earliest convience. Brian Moon dealnews.com - Original Message - From: Jani Taskinen [EMAIL PROTECTED] To: Joseph Tate [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 10, 2003 6:16 PM Subject: RE: [PHP-DEV] Register Shutdown Function for Apache | | If you need a define for it, we can add one..? | | --Jani | | | On Mon, 10 Feb 2003, Joseph Tate wrote: | | Well, to me, calling the code that flushes the headers and the output | buffers twice doesn't kill us. Unless someone can come up with a better way | to not call these two functions in main/main.c::php_request_shutdown, the | patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not | acceptable. | | Joseph | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Monday, February 03, 2003 5:30 PM | To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real | descriptive, but seems to be unique to the Apache sapi. | | Brian Moon | dealnews.com | | | - Original Message - | From: Joseph Tate [EMAIL PROTECTED] | To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; | [EMAIL PROTECTED]; [EMAIL PROTECTED] | Cc: Php-Dev List [EMAIL PROTECTED] | Sent: Monday, February 03, 2003 3:45 PM | Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | | | | Here is an updated patch which copies a few of the methods from | | main/main.c::php_request_shutdown to | | sapi/apache/sapi_apache.c::apache_php_module_main. This has | flushed both | | the headers and output buffers in my two test scripts. Now I need to | figure | | out a way to make sure these don't get called in | | main/main.c::php_request_shutdown on Apache systems. Any pointers on | this? | | Is there a handy #define that I can use if configure is | called --with-apxs? | | | | Joseph | | | | P.S. The two test scripts are: | | | | ?PHP | | header('Location: http://www.mi-corporation.com'); | | exit(); | | ? | | | | and | | | | ?PHP | | ob_begin(); | | phpinfo(); | | ? | | | | -Original Message- | | From: Brian Moon [mailto:[EMAIL PROTECTED]] | | Sent: Tuesday, January 28, 2003 5:50 PM | | To: [EMAIL PROTECTED]; Joseph Tate | | Cc: Php-Dev List; PHP Group | | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | Give me a patch and I will tell you. ;) | | | | Brian Moon | | dealnews.com | | | | | | - Original Message - | | From: Zeev Suraski [EMAIL PROTECTED] | | To: Joseph Tate [EMAIL PROTECTED] | | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | | Sent: Tuesday, January 28, 2003 4:03 PM | | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | | apache_php_module_main after calling the normal | | register_shutdown_functions? | | | | | | Yeah, something along these lines. | | | | | | What else might have problems? | | | | | | Might is a powerful word :) | | | | | | Zeev | | | | | | | | | | | | | | | -- | | PHP Development Mailing List http://www.php.net/ | | To unsubscribe, visit: http://www.php.net/unsub.php | | | | | | | | | | | | | | | | -- | - For Sale! - | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Register Shutdown Function for Apache
Well, to me, calling the code that flushes the headers and the output buffers twice doesn't kill us. Unless someone can come up with a better way to not call these two functions in main/main.c::php_request_shutdown, the patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not acceptable. Joseph -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 5:30 PM To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List Subject: Re: [PHP-DEV] Register Shutdown Function for Apache Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real descriptive, but seems to be unique to the Apache sapi. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 03, 2003 3:45 PM Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | Here is an updated patch which copies a few of the methods from | main/main.c::php_request_shutdown to | sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both | the headers and output buffers in my two test scripts. Now I need to figure | out a way to make sure these don't get called in | main/main.c::php_request_shutdown on Apache systems. Any pointers on this? | Is there a handy #define that I can use if configure is called --with-apxs? | | Joseph | | P.S. The two test scripts are: | | ?PHP | header('Location: http://www.mi-corporation.com'); | exit(); | ? | | and | | ?PHP | ob_begin(); | phpinfo(); | ? | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, January 28, 2003 5:50 PM | To: [EMAIL PROTECTED]; Joseph Tate | Cc: Php-Dev List; PHP Group | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | Give me a patch and I will tell you. ;) | | Brian Moon | dealnews.com | | | - Original Message - | From: Zeev Suraski [EMAIL PROTECTED] | To: Joseph Tate [EMAIL PROTECTED] | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | Sent: Tuesday, January 28, 2003 4:03 PM | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | apache_php_module_main after calling the normal | register_shutdown_functions? | | | | Yeah, something along these lines. | | | | What else might have problems? | | | | Might is a powerful word :) | | | | Zeev | | | | | | | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Register Shutdown Function for Apache
If you need a define for it, we can add one..? --Jani On Mon, 10 Feb 2003, Joseph Tate wrote: Well, to me, calling the code that flushes the headers and the output buffers twice doesn't kill us. Unless someone can come up with a better way to not call these two functions in main/main.c::php_request_shutdown, the patch suffices for me. MOD_PHP4_H is undefined in main.c, so it's not acceptable. Joseph -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 5:30 PM To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List Subject: Re: [PHP-DEV] Register Shutdown Function for Apache Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real descriptive, but seems to be unique to the Apache sapi. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 03, 2003 3:45 PM Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | Here is an updated patch which copies a few of the methods from | main/main.c::php_request_shutdown to | sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both | the headers and output buffers in my two test scripts. Now I need to figure | out a way to make sure these don't get called in | main/main.c::php_request_shutdown on Apache systems. Any pointers on this? | Is there a handy #define that I can use if configure is called --with-apxs? | | Joseph | | P.S. The two test scripts are: | | ?PHP | header('Location: http://www.mi-corporation.com'); | exit(); | ? | | and | | ?PHP | ob_begin(); | phpinfo(); | ? | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, January 28, 2003 5:50 PM | To: [EMAIL PROTECTED]; Joseph Tate | Cc: Php-Dev List; PHP Group | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | Give me a patch and I will tell you. ;) | | Brian Moon | dealnews.com | | | - Original Message - | From: Zeev Suraski [EMAIL PROTECTED] | To: Joseph Tate [EMAIL PROTECTED] | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | Sent: Tuesday, January 28, 2003 4:03 PM | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | apache_php_module_main after calling the normal | register_shutdown_functions? | | | | Yeah, something along these lines. | | | | What else might have problems? | | | | Might is a powerful word :) | | | | Zeev | | | | | | | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | | -- - For Sale! - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Register Shutdown Function for Apache
Here is an updated patch which copies a few of the methods from main/main.c::php_request_shutdown to sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both the headers and output buffers in my two test scripts. Now I need to figure out a way to make sure these don't get called in main/main.c::php_request_shutdown on Apache systems. Any pointers on this? Is there a handy #define that I can use if configure is called --with-apxs? Joseph P.S. The two test scripts are: ?PHP header('Location: http://www.mi-corporation.com'); exit(); ? and ?PHP ob_begin(); phpinfo(); ? -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 5:50 PM To: [EMAIL PROTECTED]; Joseph Tate Cc: Php-Dev List; PHP Group Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache Give me a patch and I will tell you. ;) Brian Moon dealnews.com - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Joseph Tate [EMAIL PROTECTED] Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] Sent: Tuesday, January 28, 2003 4:03 PM Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | At 19:54 28/01/2003, Joseph Tate wrote: | Then, could we add a sapi_flush()/ob_flush() call at the end of | apache_php_module_main after calling the normal register_shutdown_functions? | | Yeah, something along these lines. | | What else might have problems? | | Might is a powerful word :) | | Zeev | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php ? php4/ext/mysql/.libs ? php4/main/.main.c.swp ? php4/sapi/apache/.sapi_apache.c.swp Index: php4/ext/standard/basic_functions.c === RCS file: /repository/php4/ext/standard/basic_functions.c,v retrieving revision 1.543.2.4 diff -u -r1.543.2.4 basic_functions.c --- php4/ext/standard/basic_functions.c 20 Dec 2002 16:37:44 - 1.543.2.4 +++ php4/ext/standard/basic_functions.c 3 Feb 2003 21:32:05 - @@ -1121,6 +1121,7 @@ } #endif BG(user_shutdown_function_names) = NULL; + BG(user_apache_shutdown_function_names) = NULL; #if HAVE_CRYPT PHP_RINIT(crypt) (INIT_FUNC_ARGS_PASSTHRU); @@ -2085,32 +2086,28 @@ } } -void php_call_shutdown_functions(void) +PHPAPI void php_call_shutdown_functions(HashTable ** names) { TSRMLS_FETCH(); - if (BG(user_shutdown_function_names)) + if (*names){ zend_try { - zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC); + zend_hash_apply(*names, (apply_func_t) +user_shutdown_function_call TSRMLS_CC); memcpy(EG(bailout), orig_bailout, sizeof(jmp_buf)); - zend_hash_destroy(BG(user_shutdown_function_names)); - efree(BG(user_shutdown_function_names)); + zend_hash_destroy(*names); + efree(*names); + *names = NULL; } - zend_end_try(); + zend_end_try(); + } } -/* {{{ proto void register_shutdown_function(string function_name) - Register a user-level function to be called on request termination */ -PHP_FUNCTION(register_shutdown_function) +PHPAPI void register_shutdown_function_entry(HashTable ** names, int ht, zval * +return_value) { php_shutdown_function_entry shutdown_function_entry; int i; - shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); - - if (shutdown_function_entry.arg_count 1) { - WRONG_PARAM_COUNT; - } + shutdown_function_entry.arg_count = (ht); shutdown_function_entry.arguments = (pval **) emalloc(sizeof(pval *) *shutdown_function_entry.arg_count); @@ -2118,14 +2115,26 @@ RETURN_FALSE; } if (!BG(user_shutdown_function_names)) { - ALLOC_HASHTABLE(BG(user_shutdown_function_names)); - zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); + ALLOC_HASHTABLE(*names); + zend_hash_init(*names, 0, NULL, (void (*)(void *)) +user_shutdown_function_dtor, 0); } for (i = 0; i shutdown_function_entry.arg_count; i++) { shutdown_function_entry.arguments[i]-refcount++; } - zend_hash_next_index_insert(BG(user_shutdown_function_names), shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); + zend_hash_next_index_insert(*names, shutdown_function_entry, +sizeof(php_shutdown_function_entry), NULL); + RETURN_TRUE; +} + +/* {{{ proto void register_shutdown_function(string function_name) + Register a user-level function
Re: [PHP-DEV] Register Shutdown Function for Apache
Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real descriptive, but seems to be unique to the Apache sapi. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 03, 2003 3:45 PM Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | Here is an updated patch which copies a few of the methods from | main/main.c::php_request_shutdown to | sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both | the headers and output buffers in my two test scripts. Now I need to figure | out a way to make sure these don't get called in | main/main.c::php_request_shutdown on Apache systems. Any pointers on this? | Is there a handy #define that I can use if configure is called --with-apxs? | | Joseph | | P.S. The two test scripts are: | | ?PHP | header('Location: http://www.mi-corporation.com'); | exit(); | ? | | and | | ?PHP | ob_begin(); | phpinfo(); | ? | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, January 28, 2003 5:50 PM | To: [EMAIL PROTECTED]; Joseph Tate | Cc: Php-Dev List; PHP Group | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | Give me a patch and I will tell you. ;) | | Brian Moon | dealnews.com | | | - Original Message - | From: Zeev Suraski [EMAIL PROTECTED] | To: Joseph Tate [EMAIL PROTECTED] | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | Sent: Tuesday, January 28, 2003 4:03 PM | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | apache_php_module_main after calling the normal | register_shutdown_functions? | | | | Yeah, something along these lines. | | | | What else might have problems? | | | | Might is a powerful word :) | | | | Zeev | | | | | | | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Register Shutdown Function for Apache
For your reference, and all others on the list, here are the patches against the 4.3.0 release code. See the original post at http://lists.php.net/article.php?group=php.devarticle=93238. If someone e-mails me to say they'll commit the changes, I'll make the patches to head and the 4.3 branch, but as of yet, noone's spoken up. I'll not waste any more cycles on this until I get a positive response. So far there are three yes votes and no negative votes. Joseph -Original Message- From: George Schlossnagle [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP-DEV] Register Shutdown Function for Apache What is the current state of the patches? I know there where a couple implementations discussed and discarded. It would seem to me to be impossible to endorse commiting them without seeing their current state. If the current patch you're running against 4.3.0 has been posted elsewhere on the list, my apologies and can you send a link to the archives for it? ? php4/ext/mysql/.libs Index: php4/ext/standard/basic_functions.c === RCS file: /repository/php4/ext/standard/basic_functions.c,v retrieving revision 1.543.2.4 diff -u -b -r1.543.2.4 basic_functions.c --- php4/ext/standard/basic_functions.c 20 Dec 2002 16:37:44 - 1.543.2.4 +++ php4/ext/standard/basic_functions.c 7 Jan 2003 21:00:30 - @@ -1121,6 +1121,7 @@ } #endif BG(user_shutdown_function_names) = NULL; + BG(user_apache_shutdown_function_names) = NULL; #if HAVE_CRYPT PHP_RINIT(crypt) (INIT_FUNC_ARGS_PASSTHRU); @@ -2085,32 +2086,28 @@ } } -void php_call_shutdown_functions(void) +PHPAPI void php_call_shutdown_functions(HashTable ** names) { TSRMLS_FETCH(); - if (BG(user_shutdown_function_names)) + if (*names){ zend_try { - zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC); + zend_hash_apply(*names, (apply_func_t) +user_shutdown_function_call TSRMLS_CC); memcpy(EG(bailout), orig_bailout, sizeof(jmp_buf)); - zend_hash_destroy(BG(user_shutdown_function_names)); - efree(BG(user_shutdown_function_names)); + zend_hash_destroy(*names); + efree(*names); + *names = NULL; } zend_end_try(); + } } -/* {{{ proto void register_shutdown_function(string function_name) - Register a user-level function to be called on request termination */ -PHP_FUNCTION(register_shutdown_function) +PHPAPI void register_shutdown_function_entry(HashTable ** names, int ht, zval * +return_value) { php_shutdown_function_entry shutdown_function_entry; int i; - shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); - - if (shutdown_function_entry.arg_count 1) { - WRONG_PARAM_COUNT; - } + shutdown_function_entry.arg_count = (ht); shutdown_function_entry.arguments = (pval **) emalloc(sizeof(pval *) *shutdown_function_entry.arg_count); @@ -2118,14 +2115,26 @@ RETURN_FALSE; } if (!BG(user_shutdown_function_names)) { - ALLOC_HASHTABLE(BG(user_shutdown_function_names)); - zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); + ALLOC_HASHTABLE(*names); + zend_hash_init(*names, 0, NULL, (void (*)(void *)) +user_shutdown_function_dtor, 0); } for (i = 0; i shutdown_function_entry.arg_count; i++) { shutdown_function_entry.arguments[i]-refcount++; } - zend_hash_next_index_insert(BG(user_shutdown_function_names), shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); + zend_hash_next_index_insert(*names, shutdown_function_entry, +sizeof(php_shutdown_function_entry), NULL); + RETURN_TRUE; +} + +/* {{{ proto void register_shutdown_function(string function_name) + Register a user-level function to be called on request termination */ +PHP_FUNCTION(register_shutdown_function) +{ + if (ZEND_NUM_ARGS() 1) { + WRONG_PARAM_COUNT; + } + + register_shutdown_function_entry(BG(user_shutdown_function_names), ht, +return_value); } /* }}} */ Index: php4/ext/standard/basic_functions.h === RCS file: /repository/php4/ext/standard/basic_functions.h,v retrieving revision 1.109 diff -u -b -r1.109 basic_functions.h --- php4/ext/standard/basic_functions.h 5 Nov 2002 06:05:48 - 1.109 +++ php4/ext/standard/basic_functions.h 7 Jan 2003 21:00:30 - @@ -74,6 +74,8 @@ PHP_FUNCTION(highlight_string); ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini
Re: [PHP-DEV] Register Shutdown Function for Apache
On Thursday 23 January 2003 17:38, Joseph Tate wrote: I can have the patches ready to go in a very short amount of time. I'll work on and post them if I can be reasonably sure they'll be committed. I'm tired of spinning my wheels with this though. I've got a personally patched version of 4.3.0 that will be going into production in a few weeks, so I'm confident in the changes. I'd like to not use a personally patched version of PHP the next time a release comes down the pipe though. +1 on that (if my opinion does matter at all) I'd be very glad if this patch would be in the main release. Thanks for making the fix Joseph! Arpi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Register Shutdown Function for Apache
+1 for me too. It seems a lot of people (like us at dealnews) built large time consuming applications around the concept of register_shutdown_function working like this. I would love to have this back. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Php-Dev List [EMAIL PROTECTED] Cc: PHP Group [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 10:38 AM Subject: [PHP-DEV] Register Shutdown Function for Apache | I can have the patches ready to go in a very short amount of time. I'll | work on and post them if I can be reasonably sure they'll be committed. I'm | tired of spinning my wheels with this though. I've got a personally patched | version of 4.3.0 that will be going into production in a few weeks, so I'm | confident in the changes. I'd like to not use a personally patched version | of PHP the next time a release comes down the pipe though. As a reminder, | this patch will fix bug #15209 without breaking the new functionality of | register_shutdown_function under !apache systems. | | I've appealed to the [EMAIL PROTECTED] for karma to apply them myself, but for | the last two weeks have heard nothing either negative or positive. | | Joseph | | | -- | PHP Development Mailing List http://www.php.net/ | To unsubscribe, visit: http://www.php.net/unsub.php | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php