I have an existing installation of osTicket that is version 1.7 or 1.8. I want to start using the latest osTicket, but it does not appear to be an easy task if I want to retain the existing data I have on version 1.8.

How much trouble do you think it will be to port the data to the latest osTicket version? I do not see a simple upgrade route, so I was considering installing 1.14 anew and empty of tickets, and then looking into porting the data from existing 1.8 installation tables onto the 1.14. Would you suggest going this route?
Is there a different route I can try that might work better?

Do a backup of your database.
Do a backup of your site files.
Check that the system meets the requirements to run the new version (PHP 5.6 to 7.3, MySQL 5.0+)
Delete all the files of your old site.
Install the new files from the download archive.
Copy the old config file /include/ost-config.php from your backup copy of the files to /include
Log in, and the upgrader will run and upgrade the database.

You should not experience any data loss what so ever.

Thanks
I did this but the installer goes to Install and not Upgrade.
It is asking me to fill out fields like

  • Helpdesk Name
  • Default Email
  • Admin User
  • and so on

and at the end it says "Install Now".
Is there a way to check why it's going to Install and not Upgrader?

When I go to /osticket/scp/upgrade.php
I get redirected to /osticket/setup/install.php

I seemed to have copied the ost-config.php correctly. Could I be missing some databases or some other checks?

Is there a checklist I can go over? My tables were set up without the ost_ prefix, I wonder if that could be an issue, but I set it to a blank string in the config file.

If you get the installer and not the upgrader then it doesn't think that osTicket is installed.
This means that either it cannot read the /include/ost-config.php (maybe you put it in the wrong place, or the permissions are bad, or the ownership is bad), or it an and it cannot connect to the database, or it can't read the tables.

hm... I did some digging and see that the version I have is actually 1.6 ST, as seen in my config.ostversion table/field.

My include/ost-config.php is now okay. Permissions are okay.
I cannot however get past the login screen. I believe the original osTicket table structure has changed by previous developers. Also looking at database logs, osTicket 1.14 seems to be looking for table fields that weren't there, such as content.type, staff.backend, config.namespace, and others. There are dozens of errors. I tried fixing them, but so far it is a no-go in this direction.

My other hope is that I could do a fresh new install and maybe look for a way to port old ticket data into the new installation. Is there a way to do this?

I am unable to run the upgrader.
I am not sure what the upgrader looks like, I was never able to get to it.
I assume it is located at osticket/scp/upgrade.php
When I go to osticket/scp/upgrade.php, I get an osTicket screen telling me Authentication Required, and requesting me to enter username and password.
When I do so, it tells me Invalid Login, or Authentication Required, or Access Denied.

PHP Error logs?
Apache Error logs?
MySQL error logs?

MySQL Logs taken from attempting to log in SCP & upgrade

SELECT ostversion FROM config WHERE id=1
1.6 ST

SELECT COUNT(*) FROM (SELECT A1.id FROM config A1 WHERE A1.namespace = 'core') __
ERROR 1054 (42S22): Unknown column 'A1.namespace' in 'where clause'

SELECT * FROM config WHERE id = 1
*************************** 1. row ***************************
id: 1
isonline: 1
timezone_offset: -5.0
enable_daylight_saving: 1
staff_ip_binding: 1
staff_max_logins: 4
staff_login_timeout: 2
staff_session_timeout: 0
client_max_logins: 4
client_login_timeout: 2
client_session_timeout: 0
max_page_size: 25
max_open_tickets: 0
max_file_size: 104857600
autolock_minutes: 0
overdue_grace_period: 0
alert_email_id: 0
default_email_id: 1
default_dept_id: 3
default_priority_id: 2
default_template_id: 0
default_smtp_id: 1
spoof_default_smtp: 0
clickable_urls: 1
allow_priority_change: 1
use_email_priority: 1
enable_captcha: 0
enable_auto_cron: 1
enable_mail_fetch: 1
enable_email_piping: 0
send_sql_errors: 0
send_mailparse_errors: 1
send_login_errors: 1
save_email_headers: 0
strip_quoted_reply: 1
log_ticket_activity: 1
ticket_autoresponder: 1
message_autoresponder: 1
ticket_notice_active: 1
ticket_alert_active: 1
ticket_alert_admin: 1
ticket_alert_dept_manager: 1
ticket_alert_dept_members: 1
message_alert_active: 1
message_alert_laststaff: 1
message_alert_assigned: 1
message_alert_dept_manager: 1
note_alert_active: 0
note_alert_laststaff: 1
note_alert_assigned: 1
note_alert_dept_manager: 0
overdue_alert_active: 0
overdue_alert_assigned: 1
overdue_alert_dept_manager: 1
overdue_alert_dept_members: 0
auto_assign_reopened_tickets: 1
show_assigned_tickets: 1
show_answered_tickets: 1
hide_staff_name: 0
overlimit_notice_active: 1
email_attachments: 0
allow_attachments: 1
allow_email_attachments: 1
allow_online_attachments: 1
allow_online_attachments_onlogin: 0
random_ticket_ids: 1
log_level: 2
log_graceperiod: 12
upload_dir: /mnt/uploads
allowed_filetypes: .*
time_format: h:i A
date_format: m/d/Y
datetime_format: m/d/Y g:i a
daydatetime_format: D, M j Y g:ia
reply_separator: -
admin_email: [email]
helpdesk_title: Helpdesk
helpdesk_url: [url]
api_passphrase:
updated: 2011-05-19 13:17:11
ostversion: 1.6 ST

SELECT * FROM plugin
ERROR 1146 (42S02): Table 'support.plugin' doesn't exist

SELECT COUNT(*) FROM (SELECT A1.id FROM config A1 WHERE A1.namespace = 'mysqlsearch') __
ERROR 1054 (42S22): Unknown column 'A1.namespace' in 'where clause'

SELECT A1.type FROM content A1 WHERE A1.type = 'banner-staff' ORDER BY A1.name ASC
ERROR 1054 (42S22): Unknown column 'A1.name' in 'order clause'

SELECT backend FROM staff WHERE backend IS NOT NULL AND (username='dennismv' OR email='dennismv')
ERROR 1054 (42S22): Unknown column 'backend' in 'field list'

Apache/PHP error logs have these:
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/dashboard.php
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/index.php
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/login.php
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/logs.php
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/settings.php
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/settings.php?t=system
PHP Warning: file_get_contents(osticket/include/upgrader/streams//streams.cfg): failed to open stream: No such file or directory in osticket\include\class.migrater.php on line 89, referer: osticket/scp/system.php
PHP Warning: get_class() expects parameter 1 to be object, string given in osticket\include\class.dispatcher.php on line 108, referer: osticket/scp/index.php
PHP Warning: get_class() expects parameter 1 to be object, string given in osticket\include\class.dispatcher.php on line 108, referer: osticket/scp/settings.php?t=system
PHP Warning: session_destroy(): Session callback expects true/false return value in osticket\scp\logout.php on line 30, referer: osticket/scp/index.php
PHP Warning: session_destroy(): Session callback expects true/false return value in osticket\scp\logout.php on line 30, referer: osticket/scp/system.php
PHP Warning: session_destroy(): Session object destruction failed in osticket\scp\logout.php on line 30, referer: osticket/scp/index.php
PHP Warning: session_destroy(): Session object destruction failed in osticket\scp\logout.php on line 30, referer: osticket/scp/system.php
PHP Warning: session_start(): Failed to read session data: user (path: ) in osticket\include\class.ostsession.php on line 86, referer: osticket/scp/index.php
PHP Warning: session_start(): Failed to read session data: user (path: ) in osticket\include\class.ostsession.php on line 86, referer: osticket/scp/login.php

@dennismv

You have not posted your environment details such as PHP version, MySQL version, Apache version, etc.

Cheers.

$ php-win --version
PHP 7.3.7 (cli) (built: Jul 3 2019 14:34:13) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans

$ httpd -v
Server version: Apache/2.4.38 (Win64)
Apache Lounge VC15 Server built: Jan 18 2019 14:26:34

mysql.exe --version
c:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe Ver 8.0.15 for Win64 on x86_64 (MySQL Community Server - GPL)

More cleanly, my order of steps is like so:

  1. Go to http://localhost/osticket/scp/login.php
  2. Enter my previously known good username and password
  3. get Access denied error

Troubleshooting

  1. For this specific action (logging in) there are NO Apache/PHP errors in logs
  2. Developer Tools in Mozilla gives me HTTP Status Code of 422: Unprocessable Entity. Response body states "Authentication Required" and repeats the login screen.
  3. MySQL Log is as such
mysql> SELECT COUNT(*) FROM (SELECT A1.`id` FROM `config` A1 WHERE A1.`namespace` = 'core') __;
ERROR 1054 (42S22): Unknown column 'A1.namespace' in 'where clause'
mysql> SELECT * FROM config WHERE id = 1;
[full output in last post]
mysql> SELECT * FROM plugin;
ERROR 1146 (42S02): Table 'support.plugin' doesn't exist
mysql> SELECT COUNT(*) FROM (SELECT A1.`id` FROM `config` A1 WHERE A1.`namespace` = 'mysqlsearch') __;
ERROR 1054 (42S22): Unknown column 'A1.namespace' in 'where clause'

In the code, this is the Access denied message that I get:
https://github.com/osTicket/osTicket/blob/develop/include/class.auth.php#L253

For $result in https://github.com/osTicket/osTicket/blob/develop/include/class.auth.php#L235
There are attempts to authenticate on two backends, with $result respectively:
StaffAuthStrikeBackend => NULL
PasswordResetTokenBackend => bool(false)

a year later

I'm experiencing a similar problem. I am trying to upgrade my OSTicket installation from 1.9.x to 1.12.x on a server running PHP 7.1. I fetched the 1.12.x branch from github, used manage.php to deploy the code. I am now trying to login to see/run the upgrader, but I can't login to /scp. It just keeps saying "Authentication Required". I've tried to reset the password in the database multiple times using MD5 hashing. One thing I should mention is that I am doing the upgrade on a new server. So, I copied my 1.9 install, database and files, to the new server to perform the upgrade there. So, the new dev/test install has a different hostname then the live site.

    nate, what I'd try in your case is attempt the upgrade on the old server if possible.
    Another thing, try the upgrade again from the very beginning, including re-downloading software, and following each step very carefully and noting where it breaks down.
    Otherwise, I wish you luck. Just to leave an update to my own case, I gave up on attempting to install the newer OST version and still using the original. I don't think I will be attempting to retry an upgrade in the future.

      So, this is what happened for me... I enabled SSL on the dev/test site (where I'm doing the upgrade), and I updated my .htacess file with compatible rules for SSL redirects. Then, I was able to login to /scp and run the upgrader.

      dennismv It could be the environment too. I have no idea what I did, but If I attempt to upgrade my PHP version from 7.3 to 7.4, it all breaks and goes wrong. But, if I build a new box and start with PHP 7.4 I can run that version with no issues. Could be something similar causing your issues. I started on version 1.12 and am now on 1.15

      Write a Reply...