php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6784 Apache 1.3.12 SegFaults at curl_init()
Submitted: 2000-09-17 01:00 UTC Modified: 2000-10-02 13:09 UTC
From: msquillace at sogei dot it Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0.2 OS: RedHat Linux 6.2 2.2.14-12
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: msquillace at sogei dot it
New email:
PHP Version: OS:

 

 [2000-09-17 01:00 UTC] msquillace at sogei dot it
The following is enough to reproduce the problem:

<?php
echo curl_version();
/*
$ch = curl_init ("http://www.php.net/");

$fp = fopen ("php_homepage.txt", "w");

curl_setopt ($ch, CURLOPT_INFILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);

curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
*/
?>

As it is, the curl_version is correctly output to the browser, but if you just uncomment the curl_init() line, httpd crashes and in the error_log you see a Segmentation Fault (no data is output to the browser).

I get the error with curl 7.2.1, 7.2, 7.1.1, 7.1, and also on a RedHat 6.1 system.

I'm using the 'optimized' version of php.ini, but I don't think it is relevant.

My PHP 4.0.2 configure line is:

./configure --prefix=/opt/www --mandir=/usr/man \
--with-config-file-path=/opt/www/conf --disable-debug \
--enable-safe-mode --with-exec-dir=/opt/www/php/bin \
--enable-track-vars --enable-magic-quotes \
--with-apxs=/opt/www/bin/apxs --enable-bcmath \
--with-cpdflib=/opt/ClibPDF --with-jpeg-dir=/opt/jpeg \
--with-tiff-dir=/opt/tiff --enable-ftp --with-gd \
--with-mysql=/opt/mysql --with-mm=/opt/mm \
--enable-sysvsem --enable-sysvshm --enable-wddx \
--enable-xml --enable-calendar --with-zlib=/opt/zlib \
--enable-inline-optimization --with-ttf --with-readline \
--with-curl=/opt/curl

I've run PHP 4.x with this setup with no problems for the last few months, and simply added the last option a couple of days ago since the curl functions could be very useful for me at work.

I can't generate a gdb backtrace right now (after all, I think the problem can be easily reproduced), but if needed I can manage to send it.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-02 13:09 UTC] sterling@php.net
Try the latest CVS of curl, please re-open a new bug report if the problem persists.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 19 01:01:29 2025 UTC