ID:               31128
 Updated by:       [EMAIL PROTECTED]
 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

Reply via email to