#31128 [Opn->Bgs]: apache2 restart causing divide by zero when php is introduce newly
| From: | edink@php.net | Date: | Thu, 16 Dec 2004 22:07:29 +0000 |
| Subject: | #31128 [Opn->Bgs]: apache2 restart causing divide by zero when php is introduce newly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70418@lists.php.net to get a copy of this message | ||
ID: 31128
Updated by: edink@php.net
Reported By: kameshj at fastmail dot fm
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Any Operating System
PHP Version: 5.0.3
New Comment:
Adding PHP module like that is not supported. You have to do a full
stop/start when adding/removing PHP module.
Previous Comments:
------------------------------------------------------------------------
[2004-12-16 17:17:35] kameshj at fastmail dot fm
Description:
------------
I found apache2 crashes with Divide by Zero error in the following
scenario.
This is with the PHP built with ZTS mode. Hope some other defect will
occur for Non-ZTS.
With regards
Kamesh Jayachandran
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Reproduce code:
---------------
1)Disable php module and start apache2.
2)enable php in the httpd.conf
3)httpd restart(Not stop and start)
4)make a request to any php page apache crashes with divide by zero.
I drilled down on this issue.
My investigation is,
Apache on startup calls php_apache_server_startup twice
one to set a user data for a userdata_key "apache2filter_post_config"
and another to call tsrm_startup and all.
While restart it simply calls this function once which misses out call
to tsrm_startup and hence tsrm_tls_table_size is just zero inside TSRM
which causes divide by zero error in THREAD_HASH_OF macro.
This can be attributed to the loading/unloading/reloading of apache
modules to do some syntax check on its configuration(Correct me if I am
wrong This info I got from Rasmus in one of the mail thread.)
While startup post_config hook is called twice, But once when restart
is called.
Expected result:
----------------
Apache2 should not crash
Actual result:
--------------
Apache2 crashes with Divide by Zero error.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31128&edit=1