Opened 13 years ago

Closed 5 years ago

#34228 closed defect (wontfix)

php5: fsockopen don't work since php 5.3.10, with openssl 1.0.1b_0

Reported by: clement@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: jyrkiwahlstedt, macports.trippyd@…
Port: php5

Description

Since the last update, the PHP function fsockopen doesn't work with ssl :

<?php 
$connection = fsockopen('ssl://graph.facebook.com', 443);
?>

This leads to

Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: SSL: crypto enabling timeout in ...
Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: Failed to enable crypto in ...
Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://graph.facebook.com:443 (Unknown error) in ...

Change History (10)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: php openssl removed
Summary: fsockopen don't work since php 5.3.10, with openssl 1.0.1b_0php5: fsockopen don't work since php 5.3.10, with openssl 1.0.1b_0

This should be reported to the developers of PHP. See extensive recent discussion on the MacPorts mailing lists for more.

comment:2 Changed 12 years ago by macports.trippyd@…

It would be nice when you reference "extensive recent discussion on the MacPorts mailing lists" that you include a link to the archives, or possibly some kind of idea which of the 5 mailing lists contains the discussion, and when. I just searched dev, users, and tickets over the past 4 months and saw nothing that seemed appropriate, and certainly no obvious "extensive recent discussion". Basically, if you aren't going to be helpful, why respond?

This is currently a showstopper for me. I would love to know how to get this fixed, it doesn't occur in my linux server.

comment:3 Changed 12 years ago by pixilla (Bradley Giesbrecht)

macports.trippyd: See #33715

What are you seeing?

For me:

$ openssl version
OpenSSL 1.0.1c 10 May 2012
<?php

$connection = fsockopen('ssl://graph.facebook.com', 443);
var_dump($connection);

produces

resource(2) of type (stream)

comment:4 in reply to:  3 Changed 12 years ago by macports.trippyd@…

openssl version
OpenSSL 1.0.1c 10 May 2012

For your server, graph.facebook.com, I get your results, but for my mac:

php -r "var_dump(fsockopen('ssl://pilot-payflowpro.verisign.com',443,\$errnum,\$errstr,5));"

Warning: fsockopen(): SSL: crypto enabling timeout in Command line code on line 1

Call Stack:
    0.0021     229456   1. {main}() Command line code:0
    0.0030     230480   2. fsockopen() Command line code:1


Warning: fsockopen(): Failed to enable crypto in Command line code on line 1

Call Stack:
    0.0021     229456   1. {main}() Command line code:0
    0.0030     230480   2. fsockopen() Command line code:1


Warning: fsockopen(): unable to connect to ssl://pilot-payflowpro.verisign.com:443 (Unknown error) in Command line code on line 1

Call Stack:
    0.0021     229456   1. {main}() Command line code:0
    0.0030     230480   2. fsockopen() Command line code:1

On my linux server:

[dl@scsh01 ~]$ php -r "var_dump(fsockopen('ssl://pilot-payflowpro.verisign.com',443,\$errnum,\$errstr,5));"
resource(4) of type (stream)

My mac and the linux server are both originating from the same network.

comment:5 Changed 12 years ago by macports.trippyd@…

Oh yeah, linux servers openssl:

[dl@scsh01 ~]$ openssl version
OpenSSL 1.0.0-fips 29 Mar 2010

comment:6 Changed 12 years ago by macports.trippyd@…

Cc: macports.trippyd@… added

Cc Me!

comment:7 Changed 12 years ago by macports.trippyd@…

Additional information:

Taking openssl to openssl @1.0.0h_0 fixes the issue (r90715 in the macports repository).

comment:8 Changed 12 years ago by jmroot (Joshua Root)

Cc: jwa@… added
Owner: changed from macports-tickets@… to ryandesign@…

comment:9 in reply to:  2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Basically, this is not a MacPorts problem. It is a problem in the specific web server you are trying to connect to, and/or the version of openssl you are using, and/or the version of php you are using. Report problems to the people responsible for those components.

comment:10 Changed 5 years ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed

That last comment sounds like there's no point leaving this open. Also the php5 port has been obsoleted.

Note: See TracTickets for help on using tickets.