ID: 35629 Updated by: [EMAIL PROTECTED] Reported By: marius at joy2share dot com -Status: Assigned +Status: Closed Bug Type: Filesystem function related Operating System: * PHP Version: 5CVS-2005-12-12 (cvs) Assigned To: iliaa New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-12-11 23:20:43] [EMAIL PROTECTED] Ilia, it's your patch http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.102&r2=1.103&diff_format=u causing it. The following fix did the trick: http://tony2001.phpclub.net/dev/tmp/bug35629.diff ------------------------------------------------------------------------ [2005-12-11 23:14:56] [EMAIL PROTECTED] Verified and assigned to the streams mastah. ------------------------------------------------------------------------ [2005-12-11 22:22:04] marius at joy2share dot com gdb backtrace : (gdb) bt #0 0xb7d77218 in php_stream_url_wrap_http_ex (wrapper=0x81ea440, path=0xbfbbcbe4 "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-4279985-3370440?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=4, opened_path=0x0, context=0x82341f4, redirect_max=19, header_init=0, __php_stream_call_depth=0, __zend_filename=0xb7eaed18 "/share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c", __zend_lineno=643, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c:648 #1 0xb7d77132 in php_stream_url_wrap_http_ex (wrapper=0x81ea440, path=0x823414c "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=Variable "options" is not available. ) at /share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c:643 #2 0xb7d786f7 in php_stream_url_wrap_http (wrapper=0x81ea440, path=0x823414c "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=4, opened_path=0x0, context=0x82341f4, __php_stream_call_depth=1, __zend_filename=0xb7eb478c "/share2/php5.1-200512111530/main/streams/streams.c", __zend_lineno=1773, __zend_orig_filename=0xb7ea77d4 "/share2/php5.1-200512111530/ext/standard/file.c", __zend_orig_lineno=701) at /share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c:703 #3 0xb7da9610 in _php_stream_open_wrapper_ex ( path=0x823414c "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=4, opened_path=0x0, context=0x82341f4, __php_stream_call_depth=0, __zend_filename=0xb7ea77d4 "/share2/php5.1-200512111530/ext/standard/file.c", __zend_lineno=701, __zend_orig_filename=Variable "__zend_orig_filename" is not available. ) at /share2/php5.1-200512111530/main/streams/streams.c:1771 #4 0xb7d2be29 in zif_file (ht=1, return_value=0x823b824, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /share2/php5.1-200512111530/ext/standard/file.c:701 #5 0xb7dfeba6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbbd740) at /share2/php5.1-200512111530/Zend/zend_vm_execute.h:192 #6 0xb7dfe1a1 in execute (op_array=0x8233f2c) at /share2/php5.1-200512111530/Zend/zend_vm_execute.h:92 #7 0xb7ddc205 in zend_execute_scripts (type=8, retval=Variable "retval" is not available. ) at /share2/php5.1-200512111530/Zend/zend.c:1101 #8 0xb7d9386b in php_execute_script (primary_file=0xbfbbfa84) at /share2/php5.1-200512111530/main/main.c:1720 #9 0xb7e7f153 in php_handler (r=0x8219200) at /share2/php5.1-200512111530/sapi/apache2handler/sapi_apache2.c:584 #10 0x08076c6c in ap_run_handler () #11 0x080795f0 in ap_invoke_handler () #12 0x080997de in ap_process_request () #13 0x080961cf in ap_process_http_connection () #14 0x0807dedb in ap_run_process_connection () #15 0x0807e257 in ap_process_connection () #16 0x080b64f5 in child_main () #17 0x080b6814 in make_child () ---Type <return> to continue, or q <return> to quit--- #18 0x080b6f7e in ap_mpm_run () #19 0x080624df in main () (gdb) ------------------------------------------------------------------------ [2005-12-11 04:23:15] marius at joy2share dot com Description: ------------ [Sun Dec 11 05:03:00 2005] [notice] child pid 12388 exit signal Segmentation fault (11) The script below worked fine with PHP 5.0.5. I have : Apache/2.2.0 PHP/5.1.1 configured on my system. Reproduce code: --------------- <?php error_reporting(E_ALL); $link="http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance"; $f = file($link); ?> Expected result: ---------------- $f will contain an array with that file. Actual result: -------------- [Sun Dec 11 05:03:00 2005] [notice] child pid 12388 exit signal Segmentation fault (11) And I get the file with the code mentioned above for download. The file is empty. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35629&edit=1