hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

stream_socket_enable_crypto() not implemented for client sockets

Open mingtse opened this issue 12 years ago • 176 comments

stream's ssl and tls are not working in hhvm.

Running the openssl tests

http://gcov.php.net/viewer.php?version=PHP_5_3&func=tests&file=ext%2Fopenssl%2Ftests%2Fsni_001.phpt

None of them pass. HHVM exits with message:

HipHop Fatal error: Undefined function: stream_socket_enable_crypto

mingtse avatar Jan 27 '14 04:01 mingtse

It looks stream_socket_enable_crypto has not been implemented yet. Feel free to submit a PR if you (or someone else reading this) gets to this before we do.

scannell avatar Jan 27 '14 17:01 scannell

im on hhvm-fastcgi + Laravel Im having same issue when trying to send mail SMTP via Mandrill gives stream_socket_enable_crypto error

machris avatar Mar 27 '14 05:03 machris

I would love to hear if any progress on this has been made. Unable to send email via Swiftmailer on our server using HHVM.

Thanks!

mandersondesign avatar May 05 '14 23:05 mandersondesign

Ditto. It makes a number of interest libraries fail, like PHPMailer, for example.

benjaminisawolfe avatar May 12 '14 21:05 benjaminisawolfe

Any progress on stream_socket_enable_crypto function to be available? If not is there any workarounds? I really need to use swiftmailer, but without TLS encryption, it is a no go for HHVM. Still using old, slow & reliable PHPFPM.

c0h1b4 avatar Jun 24 '14 15:06 c0h1b4

Having the same problem with Xenforo it just gives a blank page whenever you try to signup at the point it does try to sent the registration email.

Seems everything else works so this is the only thing stopping me from fully being able to use Xenforo on hhvm.

Error: \nFatal error: Call to undefined function stream_socket_enable_crypto() in /public/library/Zend/Mail/Protocol/Smtp.php on line 206

eldryoth avatar Jul 21 '14 07:07 eldryoth

+1 from here!

GabrielGil avatar Jul 22 '14 06:07 GabrielGil

same story, laravel on hhvm using swiftmailer library fails, +1

ccalleu avatar Jul 22 '14 22:07 ccalleu

Same here.. Using Laravel with Swiftmailer.

ghost avatar Jul 23 '14 11:07 ghost

+1! Any way we can contribute?

erikcvisser avatar Jul 24 '14 11:07 erikcvisser

@erikcvisser Sure. stream_socket_enable_crypto needs to be implemented.

Look into hphp/runtime/ext/stream/ext_stream.cpp for other stream functions.

PHP's implementation is at https://github.com/php/php-src/blob/088eedfaa186e79f6f86b814f50efc947350bf88/ext/standard/streamsfuncs.c#L1493

SiebelsTim avatar Jul 24 '14 12:07 SiebelsTim

+1 needed for apple apn push

valentinhocher avatar Aug 11 '14 14:08 valentinhocher

+1 Is there an official work around for this?

asowers1 avatar Aug 11 '14 14:08 asowers1

Is this issue ever going to be addressed? If HHVM developers are not interested or think this is superfluous, please close this thread.

c0h1b4 avatar Aug 26 '14 14:08 c0h1b4

of course they are not going to fix it. they only fix shit that benefits them. anything else they say "feel free to submit a pull request"

r3wt avatar Aug 26 '14 14:08 r3wt

\nFatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.mandrillapp.com [Connection timed out #110]' in /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:274\nStack trace:\n#0 /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(64): Swift_Transport_StreamBuffer->_establishSocketConnection()\n#1 /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(115): Swift_Transport_StreamBuffer->initialize()\n#2 /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Mailer.php(80): Swift_Transport_AbstractSmtpTransport->start()\n#3 /usr/share/nginx/html/test.php(14): Swift_Mailer->send()\n#4 {main}
\nFatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.mandrillapp.com [Connection timed out #110]' in /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:274\nStack trace:\n#0 /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(64): Swift_Transport_StreamBuffer->_establishSocketConnection()\n#1 /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(115): Swift_Transport_StreamBuffer->initialize()\n#2 /usr/share/nginx/html/giannis/api/swiftmailer/lib/classes/Swift/Mailer.php(80): Swift_Transport_AbstractSmtpTransport->start()\n#3 /usr/share/nginx/html/test.php(14): Swift_Mailer->send()\n#4 {main}

I can successfully reproduce the problem

`

r3wt avatar Aug 26 '14 14:08 r3wt

Sorry; while we currently have 7 people working full-time on improving HHVM for non-Facebook users, this currently isn't at the top of the pile - we try to prioritize based on balancing how popular a request is vs how long it's likely to take to implement/test. This is becoming a popular issue, so it's fairly likely to be re-prioritized once some of our current projects finish.

fredemmott avatar Sep 05 '14 18:09 fredemmott

This functionality is something that takes longer than it might appear on the surface, given the sensitivity of the security implications around SSL and TLS. We just don't what to throw a half-baked implementation out to the world for something of this nature.

JoelMarcey avatar Sep 05 '14 18:09 JoelMarcey

This would be a useful feature for fuelphp/email so :+1: from fuelphp

emlynwest avatar Sep 09 '14 20:09 emlynwest

Ran into this with Stripe's API: https://github.com/stripe/stripe-php/blob/master/lib/Stripe/ApiRequestor.php#L365

JJJ avatar Sep 24 '14 13:09 JJJ