php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59858 Apache segfaults when you don't specify the first 3 parameters for fetch()
Submitted: 2011-07-18 19:04 UTC Modified: 2011-07-19 19:55 UTC
From: neenach2002 at gmail dot com Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: 5.3.6 OS: MacOS X
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: neenach2002 at gmail dot com
New email:
PHP Version: OS:

 

 [2011-07-18 19:04 UTC] neenach2002 at gmail dot com
Description:
------------
Apache segfaults when you don't specify the first 3 parameters for fetch()

Reproduce code:
---------------
$oauth = new OAuth(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);
$oauth->setToken('valid-key', 'valid-secret');
$oauth->fetch('https://api.twitter.com/1/account/verify_credentials.json');
$response = json_decode($oauth->getLastResponse());
var_dump($response);

The above code produces the issue described below. However, if the fetch line is changed to:

$oauth->fetch('https://api.twitter.com/1/account/verify_credentials.json', array(), OAUTH_HTTP_METHOD_GET);

The expected result is produced.


Expected result:
----------------
I expect to see a page with the contents of the $response variable

Actual result:
--------------
Apache segfaults and my browser prompts me to download a blank page with the same name as I'm viewing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-18 21:15 UTC] jawed@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.

Thanks for the bug report. Can you please provide a backtrace?

- JJ
 [2011-07-19 00:45 UTC] neenach2002 at gmail dot com
Here's my backtrace:

#0  0x00007fff83570e20 in strcmp ()
#1  0x0000000102aa4c03 in oauth_fetch ()
#2  0x0000000102aa8207 in zim_oauth_fetch ()
#3  0x0000000101373430 in execute_internal ()
#4  0x0000000101b2d5f9 in xdebug_execute_internal ()
#5  0x000000010137486e in zend_do_fcall_common_helper_SPEC ()
#6  0x00000001013757ac in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#7  0x0000000101373831 in execute ()
#8  0x0000000101b2d356 in xdebug_execute ()
#9  0x0000000101340980 in zend_execute_scripts ()
#10 0x00000001012be699 in php_execute_script ()
#11 0x000000010142b300 in php_handler ()
#12 0x0000000100000dcb in ap_run_handler ()
#13 0x0000000100002c6d in ap_invoke_handler ()
#14 0x0000000100024948 in ap_process_request ()
#15 0x00000001000214c8 in ap_process_http_connection ()
#16 0x000000010000e52b in ap_run_process_connection ()
#17 0x000000010002930d in child_main ()
#18 0x000000010002953f in make_child ()
#19 0x000000010002a1c9 in ap_mpm_run ()
#20 0x0000000100007768 in main ()
 [2011-07-19 01:26 UTC] jawed@php.net
Is this oauth-1.2 or trunk?

- JJ
 [2011-07-19 01:28 UTC] neenach2002 at gmail dot com
I am using 1.2
 [2011-07-19 19:55 UTC] jawed@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Please lmk if this works for you.

- JJ
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 14:01:27 2023 UTC