We recently moved our WHMCS to a much more powerful server. In the process we elected to use CloudLinux for the added security. The migration was smooth and there was no downtime because our System Administrators are awesome, however we did run into an issue with WHMCS after the move. Anytime we created a new ticket it would display the error:
Ticket ID Not Found.
We also use email piping to create new support tickets and what was odd is that the parse log was showing new emails as being parsed correctly and it showed the tickets as being created. However, tickets weren’t actually being created. It took a couple of hours to figure it out and the best article we could find on Google about it was that you can’t create a support ticket using an email address that’s also a staff email address (Duh….). So if you are receiving this error and the email address you’re entering in when creating the ticket is also the email address listed in WHMCS for one of your staff accounts then you can stop reading here because that’s your problem (Duh…. Why would you want to create a ticket for yourself in your own WHMCS?).
For us the issue tracked back to mySQL. WHMCS doesn’t work with mysql strict mode. So WHMCS was receiving the ticket input but then it was failing on the actual mySQL insert which is why the Ticket ID Not Found error was shown. To see if mySQL strict mode is enabled login via SSH and connect to mySQL.
[(none)]> select @@ sql_mode;
If it displays something like “STRICT_TRANS_TABLES” strict mode is enable and it needs to be turned off. We resolved this by doing a search thru every my.cnf file on the server for the word STRICT.
for i in $(locate my.cnf);do grep -lR STRICT $i;done
This returned a single file for us:
We then commented out the line and restarted mySQL: