Hi Forum,

Today I tried to update our live system osTicket, version 1.14.3, to the current stable version 1.18.1.

Here's what I did:

  1. Exported the database from the old system using MySQL Dump.

  2. Set up an Ubuntu 22.04 Linux server following this guide:

https://computingforgeeks.com/how-to-install-osticket-on-ubuntu-linux/.

I performed the initial setup just like I did five years ago when I first set up osTicket, using the same admin user, the same database name, the same database owner, and the same password. I just did not yet log in for the first time, with the new admin user.

  1. To import the mySQL-dump, I ran the following MySQL commands: "use osticket; --> source /path/to/file.sql;"

Now, when I try to log in with my admin user at "http://Server-IP/scp/login.php", I get stuck at the login screen.

I enter my username and password, click "Log In," "Verify" briefly appears for half a second, and then the input fields are empty again.
When I go to "http://Server-IP," it says "System is offline." I've tried the suggested database check ("isonline=1") in the forum, but it didn't improve the situation.

Before that, I had a problem with access rights to the mysql DB --> I created a user 'root' for MariaDB and gave it a secure PW. The user for the osticket-DB is named "osticket-owner". So after I imported my old mySQL-dump, I tried to login at "http://Server-IP/scp/login.php", which just showed "Not Found; The requested URL was not found on the server.

I also granted both 'root' and 'osticket-owner' in MariaDB "SUPER and PROCESS ON . TO 'both users'@'localhost';

Then I changed the corresponding entries in "...\include\ost-config.php", so now, at least, the login screen is shown.

Do you have any ideas on what I could try?

  • KevinTheJedi replied to this.
  • So a friend of mine found the problem!
    The problem was https.
    My live-system uses https with a domain-CA issued certificate. According to my friend, this option is set to "ON" in the database "osticket".
    I then installed phpmyadmin to change options in the database easier.
    So indeed, in mysql --> osticket --> ost-config, there was still the option "force https = ON".
    After I changed this to "OFF", I was able to connect to http://osticketserver/, which showed "Helpdesk Offline". I then went on and opened /scp, logged in with my old admin user and was greeted with the wonderful Updater-option.

    Thank you for your help and I hope that someone might find this conversation useful in the future!

    mcfinnigan

    You don't install osTicket on the new server; at all. You simply add the new code files to the new server, copy over your include/ost-config.php file to the include/ folder on the new server, login to MySQL on the new server, create a new/empty database on the new server, use the new/empty database, source the dump file into the new/empty database, grant the osTicket db user full access to this new database, update the include/ost-config.php file to match the new server info, login to osTicket on a web browser, and run the upgrader.

    If you get any issues you need to check your PHP error logs and your webserver error logs for a detailed reason.

    Cheers.

      KevinTheJedi Hi and thanks for your input. However I don't think I understand you correctly (sorry, not a native english speaker). I downloaded the latest stable osTicket 1.18.1 then proceeded to unzip it and move to /var/www/, like the guide I posted, asked me to do.

      Considering copying the old "ost-config.php": I tried that but I am still stuck on the login screen. Doesn't make a difference for me, if I copy over my old "ost-config.php" or configure the "new" one.

      What do you mean by "update the include/ost-config.php file to match the new server info"?

      I can not login to osTicket to run the upgrader. And I am on a completely new Server, because I was using XAMPP on a Windows Server before.

      Thanks again!

        mcfinnigan

        You will always need to use your old ost-config.php file. It has the SECRET_SALT, etc. that's needed.

        What do you mean by "update the include/ost-config.php file to match the new server info"?

        I just mean if any of the database connection info changed, etc. you need to update the file to match the new info.

        Try clearing your site cookies/cache and retry the login. If all else fails you may need to look at your PHP error logs for any related errors.

        Cheers.

        So I copied the original "OST-config.php" into "../include/" and started a Firefox private Tab --> Same result.
        I cleared my site cookies/cache and retried --> same result.

        It seems like it doesn't matter what I put into username and password. I would expect some kind of error message (i.e. "username/password does not exist") when putting in the wrong username/password, but after a brief "Verify"... nothing.
        Next thing I tried was looking up PHP error logs in /var/logs/osticket_access.log:

        127.0.0.1 - - [02/Nov/2023:07:45:35 +0100] "POST /scp/login.php HTTP/1.1" 200 344 "http://localhost/scp/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"
        127.0.0.1 - - [02/Nov/2023:07:45:35 +0100] "GET /scp/login.php HTTP/1.1" 200 2792 "http://localhost/scp/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"
        127.0.0.1 - - [02/Nov/2023:07:45:46 +0100] "POST /scp/login.php HTTP/1.1" 200 344 "http://localhost/scp/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"
        127.0.0.1 - - [02/Nov/2023:07:45:46 +0100] "GET /scp/login.php HTTP/1.1" 200 2792 "http://localhost/scp/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"
        127.0.0.1 - - [02/Nov/2023:07:45:56 +0100] "POST /scp/login.php HTTP/1.1" 200 344 "http://localhost/scp/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"
        127.0.0.1 - - [02/Nov/2023:07:45:56 +0100] "GET /scp/login.php HTTP/1.1" 200 2792 "http://localhost/scp/login.php" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"

        This time I tried it from the ubuntu Desktop directly: same result.

        The way I exported and imported the DB should work right?

        I also tried to import my old DB first and then the initial configuration. This time I got the Prefix-Error for "OST"-Prefix. I changed the new prefix to "WEST" and changed it after the initial configuration again in "OST-config.php": I got the same result.

        Do you have any other thoughts on this. Thank you again for your help!

          No. At least none that I know of. I only installed the latest stable osTicket Version 1.18.1 from github.
          I am not using any authentication plugins in my live system either.
          Should I try an older version of osTicket? But this shouldn't affect the Database, should it? And then gradually go up in Versions until I reach 1.18.1?

            mcfinnigan

            You should never have to go gradually. It's always direct upgrade to latest as it will detect your db schema_signature and know what version you are on and what patches are needed.

            At this point I'm at a loss as you haven't posted any relevant logs and there is nothing pointing to the cause of the issue. You can add debug statements to the code to see where it's failing. You can start with scp/login.php. To me it honestly is starting to sound like your ost-config.php info is incorrect or the db is having issues connecting. Do you happen to have a custom logo or login backdrop configured? If so, when you load the new site on the new server after copying the config file, db, etc. do you see your custom logo/backdrop? If not then that indicates that the system is unable to connect to the db. You should investigate the MySQL error logs/access logs to see if it's actually able to connect to the database.

            I do see that you said:

            I also tried to import my old DB first and then the initial configuration.

            When you import your DB and copy over the ost-config.php file you should not ever have to install. It should load the login screen immediately so you can login and run the Upgrader. If you aren't seeing this then you did not copy the file into the correct location or it's not able to connect to the db.

            Cheers.

            7 days later

            So a friend of mine found the problem!
            The problem was https.
            My live-system uses https with a domain-CA issued certificate. According to my friend, this option is set to "ON" in the database "osticket".
            I then installed phpmyadmin to change options in the database easier.
            So indeed, in mysql --> osticket --> ost-config, there was still the option "force https = ON".
            After I changed this to "OFF", I was able to connect to http://osticketserver/, which showed "Helpdesk Offline". I then went on and opened /scp, logged in with my old admin user and was greeted with the wonderful Updater-option.

            Thank you for your help and I hope that someone might find this conversation useful in the future!

              mcfinnigan

              Yea it's never a good idea to use that setting if you have control of your webserver. Ideally you'd want to configure the HTTPS redirect (force HTTPS) via the webserver; not osTicket. This setting is really only for people that have no control over their server (like shared host, etc.) that doesn't allow forcing HTTPS (which is few and far between nowadays).

              Glad you got this working though!

              Cheers.

              15 days later

              mcfinnigan

              Can you explain changing the force https option with a little more detail? I am not a database person but I have the exact same issue you are running into.

              Write a Reply...