php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15307 Segmentation fault if cURL tries to get a page and the server returns nothing.
Submitted: 2002-01-30 22:14 UTC Modified: 2002-03-11 17:32 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: jacob at siamesecode dot com Assigned: sterling (profile)
Status: Closed Package: cURL related
PHP Version: 4.1.1 OS: Linux 2.4.x
Private report: No CVE-ID: None
 [2002-01-30 22:14 UTC] jacob at siamesecode dot com
I found this behavior while building a client-server system
that uses cURL to get data from the server; when my
server-side script didn't return anything at all, it caused
the client side Apache process to actually die with a signal
11. I have the latest libcurl and the latest PHP, and I've
just tried updating Apache to see if that affects the
behavior (it doesn't, but it seemed like a good excuse to
get my development system up to date).

The only option I'm using for cURL is CURLOPT_RETURNTRANSFER.

I'm not sure if this means anything, but if I run cURL from
the command line, it doesn't segfault when visiting the same
totally empty URL.

Thanks for PHP! It's good, fast, AND cheap

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-30 22:17 UTC] jacob at siamesecode dot com
One more thing - I'm using https protocol for the transfer.
 [2002-01-30 22:22 UTC] jacob at siamesecode dot com
Oops - that's wrong; the OpenSSL option is installed in
libcurl, but this particular segfault happened using plain
old http.
 [2002-02-20 02:54 UTC] eles dot zoltan at creditreform dot hu
I've experienced the same problem.
Additionally info: it works fine with PHP 4.0.6.
 [2002-03-01 10:38 UTC] lox at netzwerkplanet dot de
Same problem here.
But: same code on another machine works just fine. Only differences:
working one:curl --version
curl 7.9.2 (i686-pc-linux-gnu) libcurl 7.9.2 (OpenSSL 0.9.6a)
not-working one: curl --version
curl 7.9.3 (i686-pc-linux-gnu) libcurl 7.9.3 (OpenSSL 0.9.5)
 [2002-03-11 17:32 UTC] sterling@php.net
This is fixed in 4.1.2 (I believe) or CVS most definitely... 
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 16 04:01:26 2019 UTC