OsTicket & WordPress – Is It Worth Doing Together?

osticket wordpress integration imageKey4ce OsTicket WordPress Bridge

A while back I setup and began using the OsTicket WordPress Bridge in order to process a help desk for the sites that I create and manage. The setup of OsTicket took a little while to make sure it was running properly. That was back on OsTicket version 1.6 (now on version 1.9). At that time the system was working properly and was chugging along nicely.

At some point the system no longer was accessing the email accounts that had been setup for the support desk. Upon checking the error logs I found that it was no longer able to connect to the server properly.

At first I assumed this was a connections issue, either login credentials or the server not responding. So the testing ensued.

After a while of testing the server and changing the account logins I found that it didn’t matter what I tried the OsTicket interface was not connecting to the email server. I tried changing account credentials, created new email accounts, and as much testing of the mail server as I could think.

All the email accounts and setting were working properly.

The error that kept coming up was:

authentication failure [SMTP: STARTTLS failed (code: 220, response: TLS go ahead)]

After A little research I came across this quick and dirty fix for getting the OsTicket platform just to connect to the mail server.

This requires editing the smtp.php file located in the \include\pear\Net folder.

In this file the easiest hting to do will be to do a search for PHP_VERSION.

The portion of code to look for will  look something like this:

if (version_compare (PHP_VERSION, '5 .1.0 ','>=') & & (isset ($ this-> _esmtp [' STARTTLS ']) | | ($ this-> _esmtp [' STARTTLS '] == true)) ) {

replaced it with:
if (version_compare (PHP_VERSION, '6 .1.0 ','>=') & & (isset ($ this-> _esmtp [' STARTTLS ']) | | ($ this-> _esmtp [' STARTTLS '] == true)) ) {


Please note the difference is literally  one character “5 .1.0” gets change to “6 .1.0 “. For all intense purpose you are effectively removing the checking of the “if” statement. (since it will not validate until PHP version above 6 is published to your server).

The OsTicket is trying to connect to SMTP/IMAP servers using TLS.  However, that line of code causes it to connect using TLS if the version of PHP is 5.1.0 or greater.

This may not be properly supported on all servers. You will have to double check with your host provider to confirm the settings you will need to use TLS. In many cases you might need to have an SSL certificate.

By entering the value 6.1.0 (which does not actually exist), the php file will connect without using TLS.

This allows the OsTicket to actually confirm the connection and now works perfect. This could be a potential bug, but it seems that this issue has been around for some time. Also, as the system was working fine in the past, it is unclear exactly what might have changed on the service side of things that would adversely affect it.

As of this change the system has been processing test emails and properly creating tickets within the system. Whether this change is going to negatively impact other functionality is yet to be seen. At this time I have not encountered any other errors, but I will continue to monitor the system.

In addition to the above problem just getting my OsTicket support desk back up and running, I also decided to presently drop the Key4ce osTicket WordPress Bridge plugin for a couple of reasons.

  • Plugin has not been updated for over a full year at this time.
  • With only 600 or so installs the author is likely no longer supporting it.
  • 0 of 8 tickets over thte last 2 months have not been answeredm bring me back to point number 2.
  • Since I am using it for multiple sites, did I really need to integrate it into WordPress?

I do hope the WordPress OsTicket plugin does get updated, as it would be nice to not have to completely change out the system if not needed. We shall see how it goes. It was even a plugin of the week back in 2014, see the link below.

Plugin Of The Week – 12/08/2014 – Key4ce osTicket WordPress Bridge

The WordPress OsTicket integration feature is no longer a primary concern and the plugin is not likely still being supported. Even though the plugin has a high rating and may still potentially work, I will no longer be using or recommending it until such time as the author decides to update it. Given the details listed above I won’t exactly be holding my breath on it though.