How to set Time Zone in osTicket

How to setup Time Zone in osTicket, which is very important to have your system work correctly.  If the time zone is incorrect tickets get mixed up marked wrong data/time, SLA, etc.. So here are few places you can check to confirm your system is correctly setup.  I am using an Ubuntu system other Linux system works similar path might be different.  If your time shows incorrect you should also check to make sure you have installed the PHP Extensions “Intel” which effects the time you can check it at /scp/system.php. There at least 4 places you can set the time zone, I am listing it here, your settings may vary.

Option 1: from osTicket admin panel System Settings and Preferences

/scp/settings.php

Default settings: Locale Defaults

If you need to customize:

Option 2: via php.ini file

Search or in your file under Date and just uncomment date.timezone =
Put your time zone name after = America/New_York (This would be mine)

Timezone name list: https://www.php.net/manual/en/timezones.php

Sample php.ini file looks like
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =

Option 3: via MySQL directly on the database

To see what’s currently is:

mysql -u YourDataBaseUserName -p -e “SELECT NOW();”

To see your current timezone within mysql: use the following command:

mysql> select now();

or
SHOW VARIABLES LIKE ‘%time_zone%’;

or
SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;

To set a time zone or a value: make sure to choose your own time zone:

SET time_zone = America/New_York;

or
SET GLOBAL time_zone = ‘+8:00’;

or
SET GLOBAL time_zone = ‘ America/New_York ‘;

or
SET @@global.time_zone = ‘+00:00’;

To configure the time zone in Ubuntu system:

 sudo dpkg-reconfigure tzdata

Restart the server or you can restart Apache 2 and MySQL:
/etc/init.d/mysql restart

Option 4: Agent profile, which does not affect system-wide

osTicket Agent profile: Agent panel -> Profile -> Preferences -> Localization

That’s it, check the logs of PHP, web server and osTicket if you having any issues, that will give you some more clue.

Issues you might have:

Time issues: if Intel PHP Extension is not installed:

Once you installed Intel PHP extension then, restart your apache (your webserver) service, if everything goes well it should be fine:



How to upgrade osTicket to 1.14.1

osTicket v1.14.1 is released today November 21, 2019, it’s open-source ticket system. You can find full release notes at https://github.com/osTicket/osTicket/releases. For osTicket version 1.14.1 PHP version 7.0 to 7.3, 7.3 is recommended. The process is the same as before just make sure you have a good backup of database and osTicket files.

The Upgrade process is very simple, I am doing 1.12 to 1.14.1

  • Make sure you have a good backup of Database and files of osTicket
  • Then put the system in the offline mode: by going to URL of your osTicket support ticket /scp/settings.php
  • Download the new version from https://osticket.com/download/ and choose the osTicket Core, v1.14.1 (Latest Release) don’t download any Languages or plugins, you can add them after to void issues with the upgrade.
  • Upload to your server v. 1.14.1 and replace current files/folders from the Upload folder from your downloaded, and exclude the script folder/files. Also, Maintain the directory hierarchy any changes could cause an issue with the upgrade process or something might not work well.
    • Optional: Script folder only needed if you are using remote piping, so if you are not using remote piping don’t upload.
  • Make sure NOT to replace your \include\ost-config.php which does not include in the download.

Make sure you have the correct permission, then go to the URL/SCP of the osTicket system and log in, you should see osTicket Upgrader, make sure your Prerequisites are all good, if any errors correct it, then click Start Upgrade Now

Then you will get Migrate to osTicket v1.14.1, click Upgrade now
My screenshot shows 1.14 because at the time 1.14.1 was not out. If you were to do an upgrade from 1.14 to 1.14.1 there is no database change so you will not see the upgrade screen.

If everything goes well you should see Upgrade Completed! screen

After the installation

Delete the /setup folder and update any customization you may have, test it, then once all is good you can put the system back online. Also, remove the write permission to \include\ost-config.php to secure your config. If you have customized PHP core files, those need to be re-applied after the upgrade. Also, make sure your plugins are good, if needed upgrade do so, make sure it supported version. Good luck

Also make sure to enable new feature Link and Merge tickets, by default it’s off

If you are looking at a list of open tickets you will see two new options:

Link: The ability to link tickets and Merge – the ability to merge tickets

Documentation on how to use it: https://docs.osticket.com/en/latest/Features/Ticket%20Merge%20&%20Link.html

If you have click on the ticket, then option for Link and Merge ticket are shown when clicked on the arrow next to gear icon:

Official documentation: https://docs.osticket.com/en/latest/index.html
Link to: Changelog and Community forum: https://forum.osticket.com/



How to increase attachment size in osTicket

How to attach bigger attachment in osTicket ticket system? The default setting is set to small or maybe what your web server support. If your web server already set to allow bigger attachment, then you can do it via osTicket settings page. If you have access to the server to make changes to your PHP.ini file then it’s very easy to do.

This is what your settings might look like:

If your server php.ini file has already change then go to your osTicket /scp/settings.php at the bottom of the page you will see Attachment Storage and Settings, where you will see whatever your web server maximum set to.

Editing php.ini look for upload_max_filesize= change to whatever you like.

If you have increased via editing the PHP.ini file to higher you will get more options

You will need to restart your web services to get updated settings. That’s it, enjoy bigger attachments to your support ticket system osTicket, Thank you osTicket team.



osTicket email settings

How to set up an email on an osTicket ticket system, setting up an email to create tickets and get a response back on a ticket system. It’s very easy to set up and to make the changes in case you need to if your support email changes. Here I will list a few email settings for you and you will get an idea, it’s similar you just have to check your email server requirements. Make sure you have the regular email address for your support email. It does not work with shared or forward.

Common settings::

  • Hostname: your email server FQDN
  • Port number: this can be different based on what your account setting is
  • Mail Box Protocol: this would be combined with the Port number, based on your account
  • Fetch Frequency: this can be whatever you like starting from 1 Minute
  • Email per Fetch: how many emails do you want to pull at once, this can also be from 1 to whatever
  • Fetched Emails: What happens once it creates a ticket, this should be set to move to a folder or delete, if you set it to Do nothing, you will have issues
  • Header Spoofing: some have off and some have it on

Incoming and Outgoing email:

Make sure you have email Fetching enabled for incoming emails, otherwise, by default, it will only pull emails when Agent is logged in to the system

For Outgoing email, make sure to set your support email address default as None: Use the PHP mail function

It’s under Emails>Settings
Make sure your Email Login Information is correct

Gmail settings:

This can be different based on your Gmail account settings, so check your Gmail settings and make sure to have the correct hostname, port, protocol, etc… Header spoofing is not needed.

Authentication “Yes” / MTA set as default SMTP account / PORT – 587

If you are using (G Suite) or 2FA settings you will need to create an app password:

Log in to your Gmail account and access the following link
Go to security and click the app password.
Select the app or Give a custom name that makes sense to you and click generate, now use that app-specific password in your osTicket system.

In some cases, you might need to force to use TLS, in that case, you can use the hostname as: tls://smtp.gmail.com

Exchange

  • Hostname: YourMailServer.domain.com
  • Port Number: 993
  • Mail Box Protocol: IMAP + SSL
  • Fetch Frequency: 1 minute (s)
  • Emails Per Fetch: 30
  • Fetched Emails: Move to folder: TicketsOrWhateverName

Microsoft office 365:

make sure your hostname and ports are correct
Hostname: smtp.office365.com or outlook.office365.com
Ports:587 or 993 or 25

For Synology NAS: You will need to setup Cron Job:
/usr/local/bin/YourPHPVerison /volume1/web/osticket/upload/api/cron.php

Check the logs to find more details of osTicket under /scp/logs.php
Web server, email server, Apache, etc… Many times hostname, ports, or protocol are mixed up or typos could cause the email not to work. You might have firewall issues or IP blocking. Hope this help out someone out there

Also, FYI: Ports information

IMAP uses port 143
But if you use SSL/TLS encrypted IMAP uses port 993

POP uses port 110
But if you use SSL/TLS encrypted POP uses port 995

SMTP uses port 25
But if you use SSL/TLS encrypted SMTP uses port 587 (formerly 465)

.



How to upgrade osTicket to 1.10.4

The osTicket is a great truly open source ticket system, you can customize to fit your business needs. If you are running an older version of osTicket, it’s best to keep up to date with stable releases to keep your ticket system protected. If you wait too long for an upgrade and newer version have many changes then it would get harder. The upgrade process is about the same for most version unless major version which might have database changes and it will run the upgrade script. Here is how to upgrade from version 1.10.1 to 1.10.4

  1. Make sure you have a good backup of Database and files of osTicket
  2. Then put the system in the offline mode: by going to /scp/settings.php
  3. Download the new version from https://osticket.com/download/ and choose the osTicket Core, v1.10.4 (Latest Release)
  4. Upload to your server v. 1.10.4 and replace current files/folders from Upload folder from your downloaded, and exclude the script folder/files
  5. Make sure you have the correct permission, then go to the URL/SCP of the osTicket system and login
  6. Delete the /setup folder and update any customization you may have, once all is good you can put system back online

That’s it, if customized PHP core files, those needs to be re-applied after the upgrade. If are using plugins, make sure it supports the new version. Most if not all open source project is fully customizable and downside to is keeping up to date with any customization been done to the core system. You will find many solutions to the problem in a forum where people report and help out each other. Please read your error message and logs of your system web server, PHP, osTicket, it gives many ideas about why things are not working. Many of them due to PHP version not supported. If you were to get help from the forum, please include your system information, like osTicket, PHP version, web server, and remember forum support is free, so don’t order/demand to fix your issues.

Note because 1.10.1 to 1.10.4 upgrade did not have any database changes so you will not see the upgrader screen. If you want you can run manually upgrader: /scp/upgrade.php, most likely you will see the message: “Nothing to do! System already upgraded to v1.10.4 with no pending patches to apply. ”

Common issues/solution:

error: Valid CSRF Token Required
solution: edit include/class.ostsession.php line around 191

catch (DoesNotExist $e) {
$this->data = new SessionData([‘session_id’ => $id]);
+            $this->data->session_data = “”;