I set the system to offline and checked in a logged out browser
upgraded to 18.2 from 18.1 following the instructions (backup files, backup database, copy new files over old ones)
I logged in again but there was no "Upgrading page" displayed. Just a message to delete the setup folder.

Issue : Tickets lists don't show

Symptoms : after logging in to the portal I see everything as far as the menu bar with open/my tickets/closed/search/new ticket. Nothing beyond that no page footer etc.
If I click the admin menu everything appears to be fine, full pages delivered etc. and it reports 1.18.2 in the system page

Dasboard / Information page shows :
Server Information
osTicket Version v1.18.2 (53339df) — Up to date
Web Server Software Apache/2.4.52
MySQL Version 10.6.21
PHP Version 8.4.3
PHP Extensions
gdlib Used for image manipulation and PDF printing
iconv Useful for email processing
imap Useful for email processing
ctype Required for email fetching
xml XML API
xml-dom Used for HTML email processing
json Improves performance creating and processing JSON
mbstring Highly recommended for non western european language content
phar Highly recommended for plugins and language packs
intl Highly recommended for non western european language content
fileinfo Used to detect file types for uploads
zip Used for ticket and task exporting
APCu Improves overall performance
Zend Opcache Improves overall performance

PHP Settings
cgi.fix_pathinfo "1" is recommended if AJAX is not working
date.timezone UTC
Database Information and Usage
Schema osticket202211 (localhost)
Schema Signature 5fb92bef17f3b603659e024c01cc7a59
Space Used 1643.33 MiB
Space for Attachments 617.52 MiB
Timezone GMT (Interpreted as Europe/London)

Installed Language Packs
English (United States)
en_US — include/i18n/en_US

Plugins installed are:
Plugin Name (instances) Version Status Date Installed
Help Desk Audit (1) 0.1 Enabled 2022/11/07 21:24
LDAP Authentication and Lookup (1) 0.6.2 Enabled 2022/11/07 22:17
Oauth2 Client (7) 0.6 Enabled 2022/11/07 21:24
Password Management Policies (2) 0.1 Disabled 2022/11/07 21:24
Two Factor Authenticator (1) 0.3 Enabled 2022/11/07 21:24

Errors
Nothing on screen or in the browser console
There are no errors showing in the system logs.
Error message in apache2/error.log:
...PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes) in /var/www/help/include/class.orm.php

It was originally set to 256M. For 1.18.1 it was php 8.2 and memory_size was set to 256M
I've now set it to php8.4 and 512M of memory and restarted both apache and php8.4 fpm and confirmed with phpinfo. but i still get the same error.

With so few errors its not giving me much to go on

Any suggestions appreciated

    cjohnsonuk

    Upgrading to a minor version on the same major version will not trigger upgrader. You simply need to replace the files. You should first ensure all persmissios and ownerships are all correct on all files and folders. Then you need to ensure you downloaded and replaced any currently installed plugins.

    If you still run into issues then you will need to check all 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.

    Cheers.

    Thanks for the info on the point upgrades. I've done loads of upgrades but never noticed that before.

    I've chowned everything from the root folder of the helpdesk down.
    I've copied the .phar files for the plugins downloaded with the new version of osticket into the ./includes/plugin folder and checked their ownership.
    Everything in the admin panel appears to work (what I've tested)
    I can still see users, organisations etc, its just pages with tickets causes errors like these in pache log file, No other errors anywhere:

    [Fri Feb 14 18:34:38.538063 2025] [proxy_fcgi:error] [pid 7305] [client 172.16.2.23:43389] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/help/include/class.orm.php on line 3501', referer: https://help.intranet.welfarecall.com/scp/index.php
    [Fri Feb 14 18:50:02.087332 2025] [proxy_fcgi:error] [pid 8700] [client 172.16.2.23:45012] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/help/include/class.orm.php on line 3501', referer: https://help.intranet.welfarecall.com/scp/tickets.php?queue=1

      cjohnsonuk

      What is in your include/class.orm.php file on line 3501?

      Cheers.

      cjohnsonuk

      You should also edit your bootstrap.php file, set both display_errors and display_startup_errors to 1, save the file, and retest. This should spit any PHP errors on screen.

      Cheers.

      Hi Kev, thanks for the help onthis.
      Line 3501 in class.orm.php is in this function

          function _cast($record) {
              $i=0;
              foreach ($record as &$f) {
                  switch ($this->types[$i++]) {
                  case MYSQLI_TYPE_DECIMAL:
                  case MYSQLI_TYPE_NEWDECIMAL:
                  case MYSQLI_TYPE_LONGLONG:
                  case MYSQLI_TYPE_FLOAT:
                  case MYSQLI_TYPE_DOUBLE:
                      $f = isset($f) ? (double) $f : $f;
                      break;
      
                  case MYSQLI_TYPE_BIT:
                  case MYSQLI_TYPE_TINY:
                  case MYSQLI_TYPE_SHORT:
                  case MYSQLI_TYPE_LONG:
                  case MYSQLI_TYPE_INT24:
                      $f = isset($f) ? (int) $f : $f;
                      break;
      
                  default:
                      // No change (leave as string)
                  }
              }
              unset($f);
              return $record;
          }

      specifically the foreach line.
      This function doesn't appear to have changed since 1.18.1 but many other functions in this file have changed, at least in the way they are declared.

      I've enabled the two settings in ./bootstrap.php and it now echos the error to the screen as well as a longer one into the apache log files
      On screen it says
      Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/help/include/class.orm.php on line 3501
      in the log file it says
      [Tue Feb 18 10:50:25.675654 2025] [proxy_fcgi:error] [pid 582218] [client 172.16.2.23:45948] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/help/include/class.orm.php on line 3501', referer: https://<my_url>/scp/index.php

      This is an instance we have been using for some time. It has quite a lot of tickets. I've tried viewing smaller ticket lists (like assigned to me etc) to see if that helps but it still runs out of memory, even on shorter lists.

      further update as of 2025/02/18 11:44 a clean install on the same server with a new database works fine. I swapped in the old database by changing the lines in the ost-config.php file and the same issue occurs. So it seems to be related to the database, rather than the server software or the files copied in the update

      further update as of 2025/02/18 17:31 : original instance has been restored to the backup and is working fine on 1.18.1. The backup has also been used to restore to a new domain with its own DB restored from the backup as well. The DB config table needed a few search and replaces to correct the settings to point to the new domain name.
      Copied the updated files across, restored the ost-config again and logged in to the admin interface.

      Still get no tickets showing but the error is different this time. [proxy_fcgi:error] [pid 629011] (70007)The timeout specified has expired: [client 172.16.2.23:55088] AH01075: Error dispatching request to : (polling), referer: <URL here>

      More to follow

      a month later

      I have had similar issues upgrading to 1.18.2 from 1.18.1, reverted back to 1.18.1

      "Allowed memory size of xyz bytes exhausted (tried to allocate 20480 bytes) in /.../include/class.orm.php"

      Was a solution found?

        stefanclark

        I could never replicate this; seems to be limited to you two. Did you also upgrade PHP and MySQL? MySQL should be 8.0+ now and PHP should be 8.2-8.4 (8.4 recommended).

        Cheers.

        stefanclark

        If you enable the slow query logs do you see a long running query at the time the error occurs?

        Cheers.

        Write a Reply...