I tried to upgrade Osticket from 1.12 to 15.7, i followed all steps in this docs link but the upgrade failed.
The PHP Error
PHP Fatal error: Uncaught Error: Call to a member function set() on null in /public_html/include/class.schedule.php:370
Stack trace:
#0 /include/upgrader/streams/core/00c949a6-8b923d61.task.php(9): Schedule::create(Array)
#1 /include/class.upgrader.php(348): ScheduleCreator->run(30)
#2 /include/class.upgrader.php(121): StreamUpgrader->doTask()
#3 /include/ajax.upgrader.php(35): Upgrader->call('doTask', Array)
#4 /include/class.dispatcher.php(145): UpgraderAjaxAPI->upgrade()
#5 /include/class.dispatcher.php(38): UrlMatcher->dispatch('/upgrader', NULL)
#6 /scp/ajax.php(316): Dispatcher->resolve('/upgrader')
#7 {main}
thrown in /include/class.schedule.php on line 370

The database size is big about 50G

In Osticket error log, i found
DB Error #1062
[INSERT INTO ost_scheduleSETid= 1,flags= 1,name= 'Monday - Friday 8am - 5pm with U.S. Holidays',created= NOW(),updated= NOW()] Duplicate entry '1' for key 'PRIMARY'<br /> <br /> ---- Trace ----<br /> #0 (racine)/include/mysqli.php(201): osTicket-&gt;logDBError('DB Error #1062', '[INSERT INTOo...')
#1 (racine)/include/class.orm.php(3466): db_query('INSERT INTO os...', true, true)<br /> #2 (racine)/include/class.orm.php(658): MySqlExecutor-&gt;execute()<br /> #3 (racine)/include/class.schedule.php(319): VerySimpleModel-&gt;save(false)<br /> #4 (racine)/include/class.schedule.php(364): Schedule-&gt;save()<br /> #5 (racine)/include/class.schedule.php(369): Schedule::create(Array)<br /> #6 (racine)/include/upgrader/streams/core/00c949a6-8b923d61.task.php(9): Schedule::create(Array)<br /> #7 (racine)/include/class.upgrader.php(348): ScheduleCreator-&gt;run(30)<br /> #8 (racine)/include/class.upgrader.php(121): StreamUpgrader-&gt;doTask()<br /> #9 (racine)/include/ajax.upgrader.php(35): Upgrader-&gt;call('doTask', Array)<br /> #10 (racine)/include/class.dispatcher.php(145): UpgraderAjaxAPI-&gt;upgrade()<br /> #11 (racine)/include/class.dispatcher.php(38): UrlMatcher-&gt;dispatch('/upgrader', NULL)<br /> #12 (racine)/scp/ajax.php(316): Dispatcher-&gt;resolve('/upgrader')<br /> #13 {main}
OS: Centos 7.9
WHM/Cpanel v102.0.15
Firefox 99.0 (64-bit)
MySQL: 5.7
PHP: 7.2
Apache: 2.4.53
I noticed that cron job was working.

Thanks

    tito23

    Someone had this same issue a few days ago oddly enough. I believe they solved it by restoring from backup (from before the upgrade), updating their max execution time for PHP and Apache, and started the upgrade process over again.

    Cheers.

    It was me, i thought it is the solution, but it didn't work on production

    @tito23

    At this point you should install the Attachments on the Filesystem Plugin and move all the attachments from the database to the filesystem. This way the database size decreases dramatically which should make the upgrade process run smoother.

    Cheers.

    Write a Reply...