php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45478 CURLOPT_MAXCONNECTS crashes
Submitted: 2008-07-10 14:52 UTC Modified: 2008-08-07 01:00 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: peterphp at mailinator dot com Assigned: fb-req-jani (profile)
Status: No Feedback Package: cURL related
PHP Version: 5.2.6 OS: Windows XP
Private report: No CVE-ID: None
 [2008-07-10 14:52 UTC] peterphp at mailinator dot com
Description:
------------
Hello,

Well i have PHP 5.2.1 an exists the same problem, now i update to 5.2.6 but still exists, so, basicaly apache 2 crash when i try to execute this PHP class.

The problem is with $this->handle = curl_init();, if i use $some = curl_init(); work great.

Regards,
Michael

Reproduce code:
---------------
<?php

class Browser {
   
   var $handle = null;

   function Browser() {
      $this->handle = curl_init(); 
   }


}

?>

Expected result:
----------------
Assing the curl handle to a class variable.

Actual result:
--------------
Sorry, Apache crash, it said that can't read in a memory sector.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-11 15:06 UTC] jani@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce this..
 [2008-07-11 17:15 UTC] peterphp at mailinator dot com
My Apologies, I can't understand how I couldn't detect it before, you right, I finaly found that the problem is with CURLOPT_MAXCONNECTS option, try this:

<?php

$handle = curl_init();
curl_setopt($handle, CURLOPT_MAXCONNECTS, 10);

?>

Thk U very much,
Michael
 [2008-07-30 18:55 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I can't reproduce using that last script of yours and latest CVS.
 [2008-08-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 13 14:01:27 2024 UTC