Hello,

Since a couple of days, our osTicket does not send always send email when creating or answering to a ticket. When users create a ticket, nothing happens for a while then they are redirected to a blank page. Tickets are created normally but emails are not send.

Log is :
[error] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/vhosts/16/102584/webspace/siteapps/osTicket-386/htdocs/include/pear/Mail/mime.php on line 940
[Mon Jan 7 11:00:39 2019] [error] [client xxx.xxx.xxx.xxx] Script timed out before returning headers: php-cgi, referer: http://mydomain/support/open.php

The line 940 of the mime.php is : $hdr_value = iconv_mime_encode($hdr_name, $hdr_value, $imePrefs);

Any idea if this is a PHP issue or could it be something else ?

Kind regards,

Well the error means that it executed the script for over 30s and stopped. It stopped because the max_execution_time in PHP is set to 30s. I'm not sure why sending an email on your server would take over 30s, but you can edit your php.ini and increase the time out.

side note: you probably have to restart your Apache or IIS service after you make the edit for the change to actually take.

5 days later

Thanks for the answer.

Very welcome. Are you all set now?

Write a Reply...