Upgrade issue with 1.18.x using PHP 8.2
Hi,
I am attempting to upgrade OsTicket 1.16.x to the latest 1.18.x. No changes made to the OS except PHP-8.2 was installed on my Ubuntu 20.04 box. The previous version is/was PHP-8.0. I followed all the instructions on the upgrade/ migration documentation page of OsTicket. This is what I did after taking a backup of all the files.
1) Unzip new files and copy them (overwrite) to existing OsTicket root folder.
2) osticket-conf.php
was undisturbed in the include folder.
3) Make changes to apache2.conf
to include the new PHP directive, LoadModule php_module /usr/lib/apache2/modules/libphp8.2.so
. This did not work, so removed it.
4) osticket.conf has this directive, SetHandler "proxy:unix:/var/run/php/php8.2-fpm.sock|fcgi://localhost"
.
5) Restart all services.
I am unable to open the home page and I get a HTTP 500 error. The log file shows this issue with MySQL.
[Fri Feb 02 12:01:38.050659 2024] [proxy_fcgi:error] [pid 2252] [client 172.25.1.1:63131] AH01071: Got error 'PHP
message: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in
/var/www/osticket/upload/include/mysqli.php:28\nStack trace:\n#0 /var/www/osticket/upload/bootstrap.php(217):
db_connect()\n#1 /var/www/osticket/upload/main.inc.php(28): Bootstrap::connect()\n#2
/var/www/osticket/upload/client.inc.php(21): require_once('...')\n#3 /var/www/osticket/upload/index.php(16):
require('...')\n#4 {main}\n thrown in /var/www/osticket/upload/include/mysqli.php on line 28
I hadn't touched anything in MySQL and wondering why it seems to be broken. Another thing I noticed is that PHP8.0-fpm service is also running. Why is it loaded when I have moved to 8.2? My default PHP version is 8.2.
$update-alternatives --config php
There are 2 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php8.2 82 auto mode
1 /usr/bin/php8.0 80 manual mode
2 /usr/bin/php8.2 82 manual mode
I also installed mysqli
extention manually, enabled it in my /etc/php/8.2/cli/php.ini
file but I can see my connection errors.
php -m | grep mysql
PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20220829/mysqli
(/usr/lib/php/20220829/mysqli: cannot open shared object file: No such file or directory),
/usr/lib/php/20220829/mysqli.so (/usr/lib/php/20220829/mysqli.so: undefined symbol: mysqlnd_global_stats)) in
Unknown on line 0
Strangely, the /usr/bin/php-config8.2
file is missing whereas it does exist for PHP8.0
Any help would be appreciated.
Thanks,
Anand