|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21847 php core dumps whilst retrieving images from url
Submitted: 2003-01-23 13:02 UTC Modified: 2003-02-07 23:47 UTC
From: steveh at brendata dot co dot uk Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.3.0 OS: linux-2.4.20
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-01-23 13:02 UTC] steveh at brendata dot co dot uk
When running the following code php core dumps.

// Read the draper txt file
        print("opening $url\n");
                print("Outputing to $outfile\n");
                        print($url." -> ".$outfile."\n");
                        fputs($good,$url." -> ".$outfile."\n");
                                print($url." -> ".$outfile." : $size\n");

The input file is a comma delimited list, we are interested in the filename which we then retrieve from the site (you can find the names by going to the site or by downloading the text file from the site).

Just recompiled with debug, here is the backtrace:
#0  0x08153650 in php_hostconnect (host=0x82ef62c "", port=80, socktype=1, timeout=0x0)
    at /usr/src/php-4.3.0/main/network.c:435
#1  0x08153900 in _php_stream_sock_open_host (host=0x82ef62c "", port=80, socktype=1, timeout=0x0, 
    persistent_id=0x0) at /usr/src/php-4.3.0/main/network.c:619
#2  0x0811a497 in php_stream_url_wrap_http (wrapper=0x82491f0, 
    path=0x82ed5c4 "", mode=0x82e97cc "rb", options=4, 
    opened_path=0x0, context=0x0) at /usr/src/php-4.3.0/ext/standard/http_fopen_wrapper.c:121
#3  0x08152d2c in _php_stream_open_wrapper_ex (path=0x82ed5c4 "", 
    mode=0x82e97cc "rb", options=12, opened_path=0x0, context=0x0) at /usr/src/php-4.3.0/main/streams.c:2378
#4  0x080e915a in php_if_fopen (ht=2, return_value=0x82ee5ac, this_ptr=0x0, return_value_used=1)
    at /usr/src/php-4.3.0/ext/standard/file.c:1094
#5  0x404f78f0 in zend_oe () from /usr/local/Zend/lib/
#6  0x404f43a0 in zend_oe () from /usr/local/Zend/lib/
#7  0x0816f14c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php-4.3.0/Zend/zend.c:864
#8  0x08148909 in php_execute_script (primary_file=0xbffffb40) at /usr/src/php-4.3.0/main/main.c:1573
#9  0x08190f48 in main (argc=2, argv=0xbffffbe4) at /usr/src/php-4.3.0/sapi/cli/php_cli.c:746
#10 0x40342657 in __libc_start_main (main=0x81905c8 <main>, argc=2, ubp_av=0xbffffbe4, init=0x806fe60 <_init>, 
    fini=0x8196790 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffbdc) at ../sysdeps/generic/libc-start.c:129


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-23 19:18 UTC]
Could you please provide the draper.txt so that the bug can be replicated. As is I cannot replicate the crash, merely get an error opening the specified image URL.
Also, does the crash occur if you disable ZendOptimizer?
 [2003-01-24 02:28 UTC] steveh at brendata dot co dot uk
This is the URL for the file, I will try switching off the optimiser and run again.
 [2003-01-24 03:16 UTC] steveh at brendata dot co dot uk
Still crashes with optmiser disabled but no core dump now, last string printed is corrupt.
 [2003-01-24 10:07 UTC]
Please try using this CVS snapshot:
For Windows:

Cannot replicate the crash with latest CVS.
 [2003-02-07 23:47 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 04:01:29 2023 UTC