1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 GMail Smtp SSL Could not open socket on an ubuntu XAMPP Server

Discussion in 'Troubleshooting and Problems' started by maplewang, Aug 22, 2015.

  1. maplewang

    maplewang Member

    Hi, I have configured my ubuntu server to send via gmail smtp ssl port, but every time I have tried with Could not open socket fail.
    if my smtp setup as TLS then:
    failed: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    I have tested on my ubuntu with command:
    openssl s_client -connect smtp.gmail.com:465 -crlf -ign_eof
    so it should works.

    I have also disable firewall with command: sudo ufw disable

    I think that is maybe xampp has php installed in /opt/lamp/bin and ubuntu itself has also installed a php version. I also add path to /etc/profile with: export PATH=$PATH:/opt/lampp:

    my xampp is xampp-linux-x64-5.6.8-0-installer.run
    /opt/lampp/bin/php -v
    PHP 5.6.8 (cli) (built: Apr 20 2015 18:37:47)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

    Still unlucky, is it because xenforo use php in system wide?

    my error logs is:

    Zend_Mail_Protocol_Exception: Email to xxxyyy@zzzmail.com failed: Could not open socket - library/Zend/Mail/Protocol/Abstract.php:277
    Generated By: xxxyyy, A moment ago
    Stack Trace
    #0 /opt/lampp/htdocs/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://smtp.gmai...')
    #1 /opt/lampp/htdocs/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
    #2 /opt/lampp/htdocs/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
    #3 /opt/lampp/htdocs/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
    #4 /opt/lampp/htdocs/library/XenForo/Mail.php(175): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
    #5 /opt/lampp/htdocs/library/XenForo/Mail.php(152): XenForo_Mail->sendMail(Object(Zend_Mail))
    #6 /opt/lampp/htdocs/library/XenForo/Model/UserConfirmation.php(153): XenForo_Mail->send('johnvuong1999@h...', 'johnvuong1999')
    #7 /opt/lampp/htdocs/library/XenForo/ControllerPublic/AccountConfirmation.php(108): XenForo_Model_UserConfirmation->sendEmailConfirmation(Array)
    #8 /opt/lampp/htdocs/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_AccountConfirmation->actionResend()
    #9 /opt/lampp/htdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #10 /opt/lampp/htdocs/index.php(13): XenForo_FrontController->run()
    #11 {main}
    Request State
    array(3) {
    ["url"] => string(63) "http://forum.aaaaa.com/index.php?account-confirmation/resend"
    ["_GET"] => array(1) {
    ["account-confirmation/resend"] => string(0) ""
    ["_POST"] => array(5) {
    ["_xfToken"] => string(8) "********"
    ["_xfConfirm"] => string(1) "1"
    ["_xfRequestUri"] => string(27) "/index.php?account/two-step"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    Last edited: Aug 22, 2015
  2. maplewang

    maplewang Member

    finally I installed xampp-linux-x64-5.5.24-0-installer.run with php version:

    PHP 5.5.24 (cli) (built: Apr 20 2015 19:39:09)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

    zend send is okay, So PHP 5.6.8 can not work with xenforo 1.5.
  3. Tracy Perry

    Tracy Perry Well-Known Member

    Uh...don' t tell my server that.
    [tracy@whiskey ~]$ php -v
    PHP 5.6.11 (cli) (built: Aug  6 2015 00:34:28) 
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    Seems to be running a 1.5 site just fine (along with IPS 4, myBB 1.8 twice and a few WP sites).
  4. maplewang

    maplewang Member

    I have tested with XAMPP and in that version, Zend SMTP can not work with SSL.
  5. Tracy Perry

    Tracy Perry Well-Known Member

    Never really understood why somebody uses a package like that.. when with most Linux distro's it's all available to you. The only exception I would recommend is if on a CentOS box, using CentMin Mod.

    BTW, it DOES work with a normally set up server (where you set up your HTTP server, your SQL server, your PHP processor instead of depending on a package created by someone else to configure it all for you).

    Aug 23 23:09:50 whiskey postfix/pickup[6687]: C9D7528A0568: uid=501 from=<bounce-twd+7d837b33+tracy=ride-texas.org@twowheeldemon.com>
    Aug 23 23:09:50 whiskey postfix/cleanup[8601]: C9D7528A0568: message-id=<010993dc0e9b3013d66b0a4a61c6a13cf23b4467@twowheeldemon.com>
    Aug 23 23:09:50 whiskey opendkim[2632]: C9D7528A0568: DKIM-Signature field added (s=default, d=twowheeldemon.com)
    Aug 23 23:09:50 whiskey postfix/qmgr[6688]: C9D7528A0568: from=<bounce-twd+7d837b33+tracy=ride-texas.org@twowheeldemon.com>, size=598, nrcpt=1 (queue active)
    Aug 23 23:09:52 whiskey postfix/smtp[8605]: C9D7528A0568: to=<tracy@ride-texas.org>, relay=aspmx.l.google.com[]:25, delay=1.5, delays=0.16/0.07/0.52/0.76, dsn=2.0.0, status=sent (250 2.0.0 OK 1440385792 f78si3243467qhe.78 - gsmtp)
    Aug 23 23:09:52 whiskey postfix/qmgr[6688]: C9D7528A0568: removed
    As for what PHP it uses.. whatever one the PHP processor for the HTTP server is configured to use (in this case, whatever one your XAMPP package has preinstalled/configured for you).

    Also, if you are using a self-signed cert then that also will cause issues with the newer version of PHP. It's worth just spending the little bit of kaching for a real cert for the server.
    Last edited: Aug 24, 2015

Share This Page