I am using php 8.1 with Mariadb 10.10 and trying to install OsTicket 1.18 on Windows Server 2019. Created an Empty Database 'support' . While installing OsTicket, in Last step after providing Admin and Database details, 500 - Internal server error showing. No error log found and also set display error to 1 in bootstrap.php page. No error showing in the browser. Please help.

    suman1410

    You will need to check your logs (general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, Browser Console logs, etc.) for any related errors. 500 is a generic error.

    Cheers.

      gadolphine

      In your case it can’t find the database named "osticket"; hence the error saying Unkown database osticket. Make sure you have created this database and gave the db user appropriate permissions to the database and flushed the privileges.

      Cheers.

        KevinTheJedi

        I have install version 1.16 in the past and never had an issue the database. Also I never created the database manually, the installation scripts took care of that.

          The apache sample page is in the root of the server. If I try to browse to it from another computer, page cannot display. If I browse from localhost using lynx. It works.

            KevinTheJedi
            The osticket database has not been created as yet. I am using the root user, as you can see I am able to login via the cli.

              5 months later

              I got the same error when starting the configuration process. I had to:

              • Create the database
              • Define an admin user for the DB with all privileges
              • in the DB: grant the db admin user full access to all operations.

              It looks like the install process does not do any of these items.
              (and don't forget to remove write access (set privs to 0644) for ost-config.php file

                fbgluck

                Please read my message above. That's the query used to create the database (it hasn't changed in 10 years 🤯).

                If you look at this bit of code you can see that the installer will:

                1. Try to connect to the host + port using the supplied username and password
                2. Check the current MySQL/MariaDB version to ensure it's equal to or greater than the minimum supported version
                3. Try to select the database
                4. If it doesn't exist it calls the db_create_database() method to create it

                If it's unable to create the database then most likely the database user you supplied does not have the appropriate permissions to create databases in the specified host.

                Cheers.

                I've always instructed people to:

                • create the db,
                • create the user to talk to the db,
                • and grant the user privs to the db.

                The guides that I have seen (and wrtitten) to install osTicket also tell people to do this.

                Write a Reply...