New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream_socket_enable_crypto() not implemented for client sockets #1647
Comments
It looks |
im on hhvm-fastcgi + Laravel |
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! |
Ditto. It makes a number of interest libraries fail, like PHPMailer, for example. |
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. |
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: |
+1 from here! |
same story, laravel on hhvm using swiftmailer library fails, +1 |
Same here.. Using Laravel with Swiftmailer. |
+1! Any way we can contribute? |
@erikcvisser Sure. Look into PHP's implementation is at https://github.com/php/php-src/blob/088eedfaa186e79f6f86b814f50efc947350bf88/ext/standard/streamsfuncs.c#L1493 |
+1 needed for apple apn push |
+1 Is there an official work around for this? |
Is this issue ever going to be addressed? If HHVM developers are not interested or think this is superfluous, please close this thread. |
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" |
\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 ` |
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. |
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. |
This would be a useful feature for |
Hi @antonbe |
Summary: - session_stream is not supported (putting this up as it's a reviewable unit) - creating SSL or TLS servers is not supported - incompatible: raise a warning if SSL is specified because it is insecure. - hopefully enough for SMTP + STARTTLS refs #1647 Reviewed By: @siyengar Differential Revision: D2169850
Closing as implementation is in master (hopefully in tomorrow's nightlies); we are currently expecting this in 3.8 too (it's in the branch), though that's not guaranteed - depends on further testing. We'll revert the cherry-pick and delay it to 3.9 if it leads to unrelated problems. |
Great! Actually we "glided" on this using smtppro + mandrill. Can't wait to On Mon, Jun 29, 2015 at 7:46 PM Fred Emmott notifications@github.com
|
Anybody please confirm if this implementation is included in latest nighty released?? |
It's in 2015.07.01 - tested with the Trusty package. |
Summary: - session_stream is not supported (putting this up as it's a reviewable unit) - creating SSL or TLS servers is not supported - incompatible: raise a warning if SSL is specified because it is insecure. - hopefully enough for SMTP + STARTTLS refs #1647 Reviewed By: @siyengar Differential Revision: D2169850
Hi fredemmott, I am still having trouble with Call to undefined function stream_socket_enable_crypto() error for SMTP pro plugin for Magento on Nginx + HHVM. Any tips on how to apply the latest build (and where) to make it applied on my server? |
If you're not running hhvm-nightly, you don't have it yet. You can either wait for 3.8 (recommended for production), or if you don't mind installing barely-tested versions: http://hhvm.com/blog/3203/nightly-packages |
This is included in HHVM 3.8.0 :) |
@fredemmott You're awesome! Thanks a lot :) |
So awesome! 2015-07-15 6:00 GMT+09:00 Karim Geiger notifications@github.com:
|
@fredemmott How can i enable it? I see that it freezes for like 15 seconds and times out when trying to send with gmail smtp server EDIT; NVM but now i am getting some warnings about the timezone. |
It works! Latest Version of Magento with HHVM 3.8 and Nginx 1.9.2!
Thank you FB and Fred! I can finally stop running PHP alongside HHVM and
remove all those ugly hacks!
|
I tried this out and it's not working properly, I get an error:
The function in question looks like this: public function startTLS()
{
if (!$this->sendCommand("STARTTLS", "STARTTLS", 220)) {
return false;
}
// Begin encrypted connection
if (!stream_socket_enable_crypto(
$this->smtp_conn,
true,
STREAM_CRYPTO_METHOD_TLS_CLIENT
) # This is line 262
) {
return false;
}
return true;
} Am I missing something? |
Can confirm with latest (and one older) version of PHPMailer, and HHVM 3.8.0.
Peer Debug Log:
Not much to go on though. |
Ooooh. I just realized, PHPMailer isn't working AT ALL with HHVM 3.8, regardless of stream_socket_enable_crypto(). Before (up to 3.7.2), I never cared that much for the issue on this topic, because I was using PHPMailer on localhost and let postfix do the auth thingy with the relayhost. Latest update broke that. :-( |
I have the same error as @tomazzaman. Fatal error: Unexpected object type File. in /var/www/domain.com/wp-includes/class-smtp.php on line 262 Only happen when using STARTTLS. Without HHVM, with PHP-FPM, it works fine. So I think it is not problem of Postfix. Any thought? |
Please open a new issue, ideally with < 5 line example that's just a call to stream_socket_enable_crypto() on a stream that works in PHP5 and not hhvm and doesn't depend on any framework/library. calling get_resource-type on $this->smtp_conn) seems likely to be a good starting point. |
class-smtp.php uses library PHPMailer. So the problem is with PHPMailer? |
+1 this makes HHVM unusable for Laravel developers |
@andrewmclagan : this issue is fixed. If you are still having a problem with Laravel, please file a new issue with details - HHVM version, what PHP functionality is not working (i.e. which PHP functions, not which parts of laravel), and so on. |
apologies, i pulled an old version |
af82e9a Update README.md 7d9a245 Merge pull request splitbrain#32 from lainme/master b1bf14d Allow insecure ssl connection e09f9a1 Merge pull request splitbrain#25 from Borian23/master 2a63e44 Set reply-to ecee529 Merge pull request splitbrain#24 from txthinking/updates 55ccc4d explicitly set protocols on 'tls' connection c0f0480 slightly updated phpunit, adjusted travis 49cd4e5 Merge pull request splitbrain#22 from Xylane/patch-1 2de137b Update Message.php 073c654 remove php5.6 test, next version will unsupport 09013cf support tlsv1.0 tlsv1.1 tlsv1.2 cf3af43 Merge pull request splitbrain#19 from joshtronic/feat_expand-tls c375f9f feat(tls): expand tls options 648ca5a remove setTo,setAttachment fixed splitbrain#15 06a378f Merge pull request splitbrain#14 from Echosong/master e95c7ab cli 3bbf157 update test from email d243432 Merge branch 'vinkla-patch-2' 27001aa Merge branch 'patch-2' of git://github.com/vinkla/Mailer into vinkla-patch-2 c384252 Merge pull request splitbrain#12 from vinkla/patch-1 ba62b03 Ignore phpunit.xml locally 72aef58 Rename phpunit.xml to phpunit.xml.dist f6ae003 Remove blankline 7cabdf3 Add .gitattributes a5d9ebb support SASL AUTH OAUTHBEARER Mechanism. splitbrain#11 6d3e91a for non-ascii reply-to 364c937 Merge pull request splitbrain#10 from daemionfox/master e7783dd Added reply-to da10c0b readme b0124f9 allow add cc and bcc 4dcaeda base64 encode subject a5478de utf-8 base64 encode name f372aa2 allow to send more persons who has same name, and love psr2 4746e50 add ci status 25d95e1 facebook/hhvm#1647 4943e69 fxied undefine variable 0708abd fixed for 5.3 syntax error in testing file and hhvm namespace function error 8b7bd57 add more sleeping 33b095a auto test 8c92f5a Merge pull request splitbrain#7 from splitbrain/mailtrap 574b664 Merge pull request splitbrain#8 from splitbrain/minorcleanup 9d029a0 do not send /etc/hosts in test mails e8ff6d1 removed outdated param docs a15e2d2 added missing PHPdocs 2253bdf send returns bool 3914f8a added travis config for automated tests 6acc17d run a SMTP test via TLS 1c2faeb run the exception test against localhost again 70e1674 adhere to limits 7d912a6 use mailtrap.io for testing 98cfc1f Merge pull request splitbrain#6 from splitbrain/tls 21624b3 fix TLS command 248353c Merge branch 'master' of github.com:txthinking/Mailer into ehlo 97331ad Merge branch 'splitbrain-master' into develop 543f35d update composer 85662a3 allow to set custom EHLO message git-subtree-dir: subtree/txtthinking/Mailer git-subtree-split: af82e9a
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
The text was updated successfully, but these errors were encountered: