Hi,
This is our osTicket Server Info:
osTicket Version v1.17 (1d8b790) — Up to date
Web Server Software Apache/2.4.37 () OpenSSL/1.1.1g Phusion_Passenger/6.0.6
MySQL Version 5.7.34
PHP Version 8.0.11

I just upgraded yesterday from v1.16.3 to 1.17.
Yesterday, while everything seemed to work fine, This morning I realised that from about the same time I logged out from osTicket, I received several e-mails about Cron - PHP Fatal error : Uncaught Error: Call to undefined function str_starts_with() in /home/----/----/public/include/class.email.php:466
This morning after I logged in osTicket I did not get any email about Cron PHP Fatal error.
Then I got logged out from osTicket and got again e-mails about Cron PHP Fatal error.
I also get DB Error #1062 in osTicket logs. As I don't know if both are related, I will open another thread for the DB Error.
Does anyone know what I can do to fix this? Thank you in advance.

This the log message: (I replaced part of the path by ----)

PHP Fatal error: Uncaught Error: Call to undefined function str_starts_with() in /home/----/----/public/include/class.email.php:466
Stack trace:
#0 /home/----/----/public/include/class.email.php(517): EmailAccount->isOAuthAuth()
#1 /home/----/----/public/include/class.email.php(791): EmailAccount->getBkId()
#2 /home/----/----/public/include/class.email.php(740): EmailAccount->getCredentials('oauth2:msmail', true)
#3 /home/----/----/public/include/class.email.php(722): EmailAccount->getCredentials('mailbox', true)
#4 /home/----/----/public/include/class.email.php(1198): EmailAccount->getFreshCredentials()
#5 /home/----/----/public/include/class.email.php(1189): SmtpAccount->getSmtp()
#6 /home/----/----/public/include/class.mailer.php(604): SmtpAccount->getSmtpConnection()
#7 /home/----/----/public/include/class.email.php(235): osTicket\Mail\Mailer->send(Array, 'DB Error #1062' in /home/----/----/public/include/class.email.php on line 466

  • KevinTheJedi replied to this.
  • angeland_asi

    That method is a built in PHP method that should be available in PHP 8. If it says that method doesn’t exist then your cron job is not running PHP 8 or you have deeper issues with PHP in which you will need to contact your systems administrator for further assistance.

    Cheers.

    angeland_asi

    That method is a built in PHP method that should be available in PHP 8. If it says that method doesn’t exist then your cron job is not running PHP 8 or you have deeper issues with PHP in which you will need to contact your systems administrator for further assistance.

    Cheers.

      Thank you KevinTheJedi for your answer.
      You are probably right, I didn't think to check that. I will check how cron was setup and change php version .

      Cheers.

      Write a Reply...