ID: 27810
Comment by: php dot 5 dot bluemonster at xoxy dot net
Reported By: renato at galle dot com dot br
Status: Open
Bug Type: Apache2 related
Operating System: FreeBSD-5.2.1-RELEASE-p4
PHP Version: 4.3.5
New Comment:
I continue to have problems with this, on FreeBSD 5.2.1
using ale's patched port for 4.3.6 and apache 2.0.49.
apache seems to survive a graceful restart when I start
it without SSL, but if I stop apache it leaves behind a
bunch of httpd processes that I have to kill.
If I start apache with SSL then it does not survive the
graceful restart.
Previous Comments:
[2004-04-21 07:46:57] sugihara at gix dot or dot jp
OS: VineLinux2.6r4(kernel2.4.22)
Apache: 2.0.49
PHP : 4.3.6
FreeBSD port works fine on Linux too.
Without patch, 4.3.6 also caused Apache's segfault error. So Apache
crashed everytime log files were rotated by cron.
Thank you so much.
[2004-04-20 16:49:04] paul at vanbrouwershaven dot com
Same problem here with the lasted stable release PHP 4.3.6
[2004-04-19 19:09:19] renato at galle dot com dot br
Here is the patch to fix it on php-4.3.6:
--- ext/pcre/php_pcre.c.origFri Apr 16 09:21:14 2004
+++ ext/pcre/php_pcre.c Fri Apr 16 09:23:36 2004
@@ -106,15 +106,6 @@
REGISTER_LONG_CONSTANT("PREG_SPLIT_DELIM_CAPTURE",
PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE",
PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS
| CONST_PERSISTENT);
-
- pcre_malloc = php_pcre_malloc;
- pcre_free = php_pcre_free;
-
-#ifdef NO_RECURSE
- pcre_stack_malloc = php_pcre_malloc;
- pcre_stack_free = php_pcre_free;
-#endif
-
return SUCCESS;
}
/* }}} */
@@ -130,6 +121,16 @@
}
/* }}} */
+/* {{{ PHP_RINIT_FUNCTION(pcre) */
+static PHP_RINIT_FUNCTION(pcre)
+{
+ pcre_malloc = php_pcre_malloc;
+ pcre_free = php_pcre_free;
+
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ pcre_get_compiled_regex
*/
PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra,
int *preg_options) {
@@ -1527,7 +1528,7 @@
pcre_functions,
PHP_MINIT(pcre),
PHP_MSHUTDOWN(pcre),
- NULL,
+ PHP_RINIT(pcre),
NULL,
PHP_MINFO(pcre),
NO_VERSION_YET,
[2004-04-19 19:09:19] renato at galle dot com dot br
Here is the patch to fix it on php-4.3.6:
--- ext/pcre/php_pcre.c.origFri Apr 16 09:21:14 2004
+++ ext/pcre/php_pcre.c Fri Apr 16 09:23:36 2004
@@ -106,15 +106,6 @@
REGISTER_LONG_CONSTANT("PREG_SPLIT_DELIM_CAPTURE",
PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE",
PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS
| CONST_PERSISTENT);
-
- pcre_malloc = php_pcre_malloc;
- pcre_free = php_pcre_free;
-
-#ifdef NO_RECURSE
- pcre_stack_malloc = php_pcre_malloc;
- pcre_stack_free = php_pcre_free;
-#endif
-
return SUCCESS;
}
/* }}} */
@@ -130,6 +121,16 @@
}
/* }}} */
+/* {{{ PHP_RINIT_FUNCTION(pcre) */
+static PHP_RINIT_FUNCTION(pcre)
+{
+ pcre_malloc = php_pcre_malloc;
+ pcre_free = php_pcre_free;
+
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ pcre_get_compiled_regex
*/
PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra,
int *preg_options) {
@@ -1527,7 +1528,7 @@
pcre_functions,
PHP_MINIT(pcre),
PHP_MSHUTDOWN(pcre),
- NULL,
+ PHP_RINIT(pcre),
NULL,
PHP_MINFO(pcre),
NO_VERSION_YET,
[2004-04-19 18:40:56] remco at linux-adept dot nl
Using PHP 4.3.5 or 4.3.6 crashes my Apache 2.0.49 doing a 'apachectl
graceful'. Which is a kill for logrotation! Everything was fine untill
4.3.5 came along. Changing back to 4.3.4 solves the problem.
I have tried recompiling apache etc. Nothing helps.
Gracefully restarting apache gives the following in the error-logs:
[Mon Apr 19 18:28:10 2004] [notice] Graceful restart requested, doing
restart
[Mon Apr 19 18:28:10 2004] [notice] seg fault or similar nasty error
detected in the parent process
And apache has to be restarted once more to get it running.
The remainder of the comments for this report are too long. To view
the rest of the comments, pleas