I'm trying to update from 1.15.5 to 1.17.4 via Softaculous updater. I'm running PHP 7.x and it asks me to switch to 8.x, which I select and the installation seems to move forward. When I go to the upgrade link, two of the four items are upgraded when I click the button, but the other two aren't. That's where the process is stuck.

When I click the Upgrade button it spins for a second. If I click it more that once, the whole things stops and becomes a white screen.

Check the server log, I see:

[13-Jun-2023 22:01:33 UTC] PHP Fatal error:  Uncaught Error: Non-static method Misc::currentURL() cannot be called statically in /home/playshak/support.domain.com/bootstrap.php:369
Stack trace:
#0 /home/playshak/support.domain.com/main.inc.php(23): require()
#1 /home/playshak/support.domain.com/client.inc.php(21): require_once('/home/playshak/...')
#2 /home/playshak/support.domain.com/index.php(16): require('/home/playshak/...')
#3 {main}
  thrown in /home/playshak/support.domain.com/bootstrap.php on line 369

So I restored the backup and tried again with the same results. How can I successfully upgrade?

    severdia

    Seems like your code wasn’t completely updated as this line has since been updated.

    Cheers.

    severdia

    So let me get this straight..you replace the code with the new code, you run the upgrade, and you get the Misc::currentURL error? If so that makes no sense unless you need to restart your webserver to clear file cache.

    Cheers.

    Yes, that's correct. It's the same error whether I run the update via Softaculous or do it manually. It'd be great to know what "Something went wrong" meant or why there's an error on that line.

      severdia

      That line shouldn’t be there in the new code is what I’m saying. It sounds like your server is still serving the old files somehow.

      Cheers.

      I downloaded the 1.18 package from the osticket.com website and uploaded it to the server and manually ran the update. What do you mean by "that line shouldn't be there in the new code"? It's what I downloaded from osticket.com.

        severdia

        This line:

        define('THISPAGE', Misc::currentURL());

        The error you are getting is PHP Fatal error: Uncaught Error: Non-static method Misc::currentURL() cannot be called statically which should not happen as this line was removed and should not exist in v1.18. Unless of course this error was logged before you updated the code; which you haven't confirmed. If that's just an error generated by the old code and does not actually occur on upgrade then when the upgrader fails look at the Dashboard > System Logs for any errors.

        Cheers.

        severdia

        I think we should start over here..

        Clear your error logs or just remember the last entry. Update the codebase to v1.18, run the upgrade, and if it fails check the error logs again. If you don’t see an error there check your Dashboard > System Logs for any related errors.

        Cheers.

        Same error and this is what the System Logs looks like.

        The "task pending" appears to be the last three issues listed here that are stuck.

          severdia

          So you get a new error with Misc::currentURL()? If so your server is messed up somehow. You should restore from backup, update the code again, restart your webserver to clear any file cache, and redo the upgrade. You may also need to contact your hosting provider to see how to fully clear the file cache on the server. Some hosts have tools in CPanel to do this for you.

          When the upgrader gets stuck on a Task then you can simply click Upgrade Now and continue the upgrade. Your host has some timeouts enabled and the upgrade Task is taking too long so it timed out. You can continue the upgrade by clicking Upgrade Now.

          Cheers.

          No, the error has always been the same. Nothing is timing out because it happens instantly. I'll ask my hosting provider to take a look, but I don't think it has anything to do with the cache.