php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3737 CGI version crashes when run via web server but not command line
Submitted: 2000-03-05 20:26 UTC Modified: 2000-03-28 22:07 UTC
From: brad at brocku dot ca Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Beta 4 Patch Level 1 OS: IRIX 6.5.4
Private report: No CVE-ID: None
 [2000-03-05 20:26 UTC] brad at brocku dot ca
Any script will run just dandy when run from a Unix shell. If though, its executed as a CGI, php4b4p1 will crash. For example, given the following php script:

#!/usr/local/bin/php4
<?php
?>

a corefile is produced (backtrace later) if called via the webserver (apache 1.3.6) but produces

       Content-type: text\html\n\n

if called from the command line.

I have pared down the compile to the bare bones...no options, just ./configure.

This problem seems to exist on any SGI IRIX6.5.4 set up. I will be testing it on other versions soon.

If there is anything I can do to assist in tracking down the issue, please do not hesitate to contact me.

BACKTRACE

Core from signal SIGBUS: Bus error
(dbx) where
>  0 _mem_block_check(ptr = (nil), silent = 1, __zend_filename = 0x100f51d8 = "z
end_hash.c", __zend_lineno = 535, __zend_orig_filename = (nil), __zend_orig_line
no = 0) ["/usr/local/sources/php/php-4.0b4pl1/Zend/zend_alloc.c":483, 0x1001bcc4
]
   1 _efree(ptr = (nil), __zend_filename = 0x100f51d8 = "zend_hash.c", __zend_li
neno = 535, __zend_orig_filename = (nil), __zend_orig_lineno = 0) ["/usr/local/s
ources/php/php-4.0b4pl1/Zend/zend_alloc.c":170, 0x1001a904]
   2 zend_hash_destroy(ht = 0x1011b8fc) ["/usr/local/sources/php/php-4.0b4pl1/Ze
nd/zend_hash.c":535, 0x1001f024]
   3 php_rshutdown_basic(type = 1, module_number = 18) ["/usr/local/sources/php/
php-4.0b4pl1/ext/standard/basic_functions.c":467, 0x1005793c]
   4 module_registry_cleanup(module = 0x10145220) ["/usr/local/sources/php/php-4
.0b4pl1/Zend/zend_API.c":872, 0x1002a6d4]
   5 zend_hash_apply(ht = 0x1011b2f0, apply_func = 0x1002a660) ["/usr/local/sour
ces/php/php-4.0b4pl1/Zend/zend_hash.c":655, 0x1001f604]
   6 zend_deactivate() ["/usr/local/sources/php/php-4.0b4pl1/Zend/zend.c":462, 0
x10046b54]
   7 php_request_shutdown(dummy = (nil)) ["/usr/local/sources/php/php-4.0b4pl1/m
ain.c":670, 0x100171ac]
   8 main(argc = 2, argv = 0x7fff2f54) ["/usr/local/sources/php/php-4.0b4pl1/sap
i/cgi/cgi_main.c":568, 0x10015c34]
   9 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.
s":177, 0x10014b68]

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-06 12:37 UTC] brad at brocku dot ca
This has NOT been tested with the mod_php version. I will be doing this later this week and will update this entry at that time.
 [2000-03-28 22:07 UTC] brad at brocku dot ca
This issue does not exist in PHP4.0 RC1
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 20:00:01 2026 UTC