# bug in sapi apache2filter

- Thread: https://externals.io/message/12026
- Original archive: https://news-web.php.net/php.internals/12026
- Started by Kamesh Jayachandran on 2004-08-09T05:56:01+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #12026 — Kamesh Jayachandran — 2004-08-09T05:56:01+00:00

URL: https://externals.io/message/12026#12026

Hi All,
I found apache giving segmentation fault in the following scenario.
1)Disable php module and start apache.
2)enable php in the httpd.conf
3)httpd restart(Not stop and start)
4)make a request to any php page apache segfaults.
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.

With regards
Kamesh Jayachandran
