[ ] Can you reproduce the problem in a fresh installation of the "develop" branch?
Cannot test
[ ] Do you have any errors in the PHP error log, or javascript console?
PHP Warning: Use of undefined constant PriorityField - assumed 'PriorityField' (this will throw an Error in a future version of PHP) include/class.forms.php on line 2300
Use of undefined constant DepartmentField - assumed 'DepartmentField' (this will throw an Error in a future version of PHP) /include/class.forms.php on line 2404
Use of undefined constant AssigneeField - assumed 'AssigneeField' (this will throw an Error in a future version of PHP) include/class.forms.php on line 2525
Use of undefined constant TicketStateField - assumed 'TicketStateField' (this will throw an Error in a future version of PHP) /liveticket/include/class.forms.php on line 2615
Use of undefined constant TicketFlagField - assumed 'TicketFlagField' (this will throw an Error in a future version of PHP) /include/class.forms.php on line 2674
Use of undefined constant SelectionField - assumed 'SelectionField' (this will throw an Error in a future version of PHP) include/class.list.php on line 525
PHP Warning: count(): Parameter must be an array or an object that implements Countable in include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in/include/pear/Mail/mimePart.php on line 314
[x] Did you check the osTicket forums?
Sure
[x] Did you perform a cursory search to see if your bug or enhancement is already reported? Sure
For more information on how to write a good bug report
Seems some overdue ticket generate cron error alert by email. PHP version is 7.1
Ticket has been marked as expired from the system after 48 hours and the cron generate errors.
Expected behavior: [What you expected to happen]
No error
Actual behavior: [What actually happened]
Errors
osTicket (v1.10.1)
Admin panel -> Dashboard -> Information which also additionally gives you information about you server.
Web Server Software | Apache
-- | --
Versione MySQL | 5.6.X
Versione PHP | 7.1.X
Also, please include the OS and what version of the OS you're running. As well as your browser and browser version.
Centos 7 , Firefox 59
Please downgrade PHP to 5.6 or 7.0 and re-test.
I think the issue is the PHP version. Never had this issue in the past.
5.6 is still supported but quite old :D
@PeopleInside
PHP 7.x+ support will be coming in v2.0.
Cheers.
Thank you @JediKev , there is a indicative date for 2.0?
Thank you for the help!
@PeopleInside
Not at the moment but once we do have one, it will be made public.
Cheers.
As I do not want downgrade PHP I will try to look for help on stackoverflow. PHP 5.6 is old also if still be supported. Will be the next release of PHP to be dead.
I love OsTicket but sad to see are not yet compatibile with PHP 7 who has been released 2015 if I am not wrong.
Thanks anyway :) hope to see an update of OSTicket.
I am trying to fix this issue. After fix this by adding '' to elements seems new error come:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/liveticket/include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/liveticket/include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/liveticket/include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/liveticket/include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/liveticket/include/pear/Mail/mimePart.php on line 314
PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/liveticket/include/pear/Mail/mimePart.php on line 314
Can I disable email alert for PHP issue? I cannot downgrade to PHP 5.6 because some app are not supporting 5.6 anymore.
Can I use a php.ini file inside the OsTicket folder for disable email warning?
Please help.
Seems for now I have to downgrade to PHP 7.1 with some fix I found on GitHub all work. Very bad that OsTicket only support old PHP 5.6 :S I love OsTicket but I need stay with old PHP if I want use or find some code edit online for work with PHP 7.1
7.2 is completely not supported.
Some software has stopped to support PHP 5.6 like invoice ninja.
Ok for now seems I resolved with PHP 7,1 and some edits to OsTicket
As previously stated.
5.6 and 7.0 are supported.
7.1+ support is coming in v2.0 and likely in 1.11.
In this topic still be the error:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in **/**/osticket/include/pear/Mail/mimePart.php on line 314
that need to be solved.
https://github.com/osTicket/osTicket/blob/develop/include/pear/Mail/mimePart.php#L314
At the moment i have no fix for this but if i will find i will merge here. Any help is appreciated.
At the moment seems help to stop error sent by email on new ticket created from email changing
line 314 from if (count($this->subparts)) { to if (is_array($this->subparts)) { but i believe this can be not a complete and correct fix... but allow me at the moment to use PHP 7.2