Hesk Problem after Updating to PHP 5.6

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
peopleinside_it
Posts: 60
Joined: Mon Jun 17, 2013 4:56 pm

Hesk Problem after Updating to PHP 5.6

Post by peopleinside_it »

Version of script: 2.5.5
What terms did you try when SEARCHING for a solution:
problem in sending email
email problem php 5.6

Write your message below:

Hi,
after updating from php 5.5 to 5.6 now if i try to send a message in ticket i can see message to contact admin because mail was not send.

I look into email and test SMTP and pop
and all test fails.

Error in SMTP is
Could not start TLS connection encryption protocol

Resolving SMTP server domain "smtp.mywebsite.ext"...
Connecting to host address "IP" port 25...
Connected to SMTP server "smtp.mywebsite.ext".
S 220 mywebsite.ext ESMTP
C EHLO www.mywebsite.ext
S 250-mywebsite.ext Hello www.mywebsite.ext [IP]
S 250-SIZE 52428800
S 250-PIPELINING
S 250-AUTH LOGIN PLAIN
S 250-STARTTLS
S 250 HELP
C STARTTLS
S 220 TLS go ahead
Starting TLS cryptograpic protocol

in pop3 of gmail i see
Errore: 0 could not connect to the host "pop.gmail.com":
Connecting to pop.gmail.com ...

Should be a changes in the PHP 5.5 to 5.6 or what?
How i can understand how to fix?
Now i have go back to PHP 5.5

Thanks.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by Klemen »

PHP 5.6 made some changes to OpenSSL stream wrappers - it now verifies SSL certificates by default and seems like there is a mismatch with gmail's SMTP certificate.

I would recommend keeping PHP 5.5.x until HESK officially supports PHP 5.6.x

That said, you can try changing this in file "inc/mail/smtp.php":

1. find line

Code: Select all

$this->OutputDebug('Starting TLS cryptograpic protocol');
2. BELOW that line add

Code: Select all

$contextOptions = array(
    'ssl' => array(
        'verify_peer' => false,
		'verify_peer_name' => false,
    ),
);
stream_context_set_option($this->connection, $contextOptions );
3. Save and test



POP3 to Gmail should still work normally if you use these settings and don't have port 995 blocked in firewall.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
peopleinside_it
Posts: 60
Joined: Mon Jun 17, 2013 4:56 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by peopleinside_it »

I will wait,
i think is better.

When i will see an update i will update and then check again.
Thank you!

The strange think is not work also with my server email.. maybe for the same problem TLS missmatch too in my server..
I will wait.
peopleinside_it
Posts: 60
Joined: Mon Jun 17, 2013 4:56 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by peopleinside_it »

Hi,
now Hesk 2.6.2 supports PHP 5.6 i see.

But if i use PHP 5.5 my email (email@mydomain.com) with SSL works, if i swith to PHP 5.6 not work this i think because certificate for email can be self-signed.

So i don't understand.. if i want upgrade my server to PHP 5.6 how to make my server email works as with PHP 5.6 the same email authentication with PHP 5.5 works, with PHP 5.6 not works?

Thanks
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by Klemen »

Like said, PHP 5.6 made some changes to OpenSSL stream wrappers that's why you are having problems. If you want details see http://php.net/manual/en/migration56.openssl.php

If self-signed certificates don't work then something is most likely not setup correctly on the server (PHP, or better say openssl doesn't recognize your self-signed certificates).

You can still try the changes I mentioned in a previous reply and see if those help in your case.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
peopleinside_it
Posts: 60
Joined: Mon Jun 17, 2013 4:56 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by peopleinside_it »

Thanks Klemen but i can't solve this problem only for Hesk. If i do this change in Hesk i will have the same issue on Wordpress and all other script or web app who i use.

For this reason i will try to understand better why i see this issue all work with PHP 5.5 and not with PHP 5.6

Is not a good think this php update. I can't understand how is possibile many people didn't have issues. Maybe you have to be more expert for solve this issue on servers and .. i will look at solution.
Thanks.
Ivan_D
Posts: 1
Joined: Sun May 24, 2015 3:26 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by Ivan_D »

How to fix /pop3.php to begin working POP?
peopleinside_it
Posts: 60
Joined: Mon Jun 17, 2013 4:56 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by peopleinside_it »

The best solution is solve on PHP 5.6 because you can solve the issue on Hesk but you will have also in your Wordpress install or other software install who had the same certificate problem.

I really not understand the new update of PHP 5.6 and Apache 2 seems be all more difficult and not work :P bah :P
dMb
Posts: 3
Joined: Tue Mar 11, 2014 6:27 pm

Re: Hesk Problem after Updating to PHP 5.6

Post by dMb »

Hello

I updated to a new server with PHP 5.6.99 and this same error sending email. I do not have root access to the server could not do any of the recommended fixes however got it working by changing SMTP from TLS to SSL.

So TLS / Port 587 worked on old server but not on new one.

Changed to SSL / Port 465 and now all works perfectly.

Hope this helps someone.
Post Reply