Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Issues related to Upgrade from 5.5 to 5.7

Hello Team ,

I have started upgrading my testrail instance from testrail 5.5 to testrail 5.7 for that we have installed PHP 7.2 a mentioned in the below document.

http://docs.gurock.com/testrail-admin/installation-upgrading

but after successful completing all the steps mentioned in the document we have not able to connect to testrail where we can see below error message

" XX.X.XXX.XX is currently unable to handle this request.

HTTP ERROR 500

For further investigation we have check error.log file and found below errors

PHP Fatal error: Uncaught Error: Class ‘Services’ not found in /var/www/html/testrail/sys/boot/errors.php:86\nStack trace:\n#0 /var/www/html/testrail/app/boot/index.php(81): errors::show(‘The xml PHP ext…’, ‘TestRail needs …’)\n#1 /var/www/html/testrail/app/boot/index.php(199): prereq::xml()\n#2 /var/www/html/testrail/index.php(96): require_once(’/var/www/html/t…’)\n#3 {main}\n thrown in /var/www/html/testrail/sys/boot/errors.php on line 86

For further clarification we have installed all the required extensions like mbstring,xml,curl,json,mysql for PHP7.2

Please help us for this upgrade scenario…

I had the same issue u need to upgrate ur testrail server to PHP 7.2. our server was in house so it was pretty easy

Hi Shashank,

Thanks for your reply but my while upgrading to 5.7 I already installed PHP 7.2 but still experiencing same error and not able to load testrail index.php page.

Hi Shashank ,

Any thoughts on my above comments…

Thanks & Regards,
Kedar Pathak

Hi Kedar,

Thanks for the post. For troubleshooting installation and upgrading issues, we would generally recommend reaching out directly to the support team via email at contact@gurock.com. This will allow us to gather the necessary details in private communication and assist directly. If you haven’t already, please send in an email and we’ll be happy to help.

Don’t know if this is still needed for you, but I figured I would chime in since I ran into the same problem and let you know how we solved it.

A colleague of mine was tasked with trying the upgrade to 5.7 and hit a wall when he encountered the same error after trying to upgrade from 5.5 to 5.7 a few weeks ago. Other priorities in the office led us to postpone upgrading. When 6.0 was released, I was asked to try upgrading myself.

Since Mysql 5.5 was no longer supported, first thing I did was upgrade our DBMS, from MariaDB 5.5.60 to 10.3. Next I upgraded PHP from 5.4 to 7.2, and then I upgraded Testrail itself.

I got the error about the Services class being missing just as my colleague did. At this point, I figured it might be because we were using MariaDB rather than straight MySQL, so I was assuming that i would have to start over and try uninstalling MariaDB and switching to MySQL 5.7, which I wasn’t looking forward to.

However, I noticed something when I tried, merely for completeness sake, to fix the IonCube PHP loader extension as well. I updated the “zend_extension” path in our php.ini file to point to 7.2 instead of 5.4 now that we were using the newer PHP version, and I ran the command “php -m” to confirm that Ioncube was correctly being picked up, when I noticed at the top of the output from that command was the following warning…

PHP Warning: PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/lib64/php/modules/mysql.so (/usr/lib64/php/modules/mysql.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/mysql.so.so (/usr/lib64/php/modules/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

I wondered if that meant that somehow while upgrading PHP I forgot to also upgrade the php-mysql plugin. Running rpm -qa | grep php, I saw all the php RPMs I had were correctly at version 7.2, but I noticed there was no “php-mysql” RPM at all in the list. There was however a “php-mysqlnd” instead. A quick Google search showed that php-mysqlnd was indeed a replacement for php-mysql. That was also confirmed when I tried running yum install php-mysql and it said Package php-mysql-5.4.16-46.el7.x86_64 is obsoleted by php-mysqlnd-7.2.20-1.el7.remi.x86_64 which is already installed. Nothing to do. I looked in the path where the PHP plugin modules are stored (the warning lists it, /usr/lib64/php/modules/ in our case) and sure enough, there was no mysql.so file in there, but there was a mysqlnd.so file! Maybe we just needed to tell PHP to use that instead?

Edited php.ini again and looked for mysql.so in it. Found “extension=mysql.so”, so I just changed it to “extension=mysqlnd.so”, restarted apache and it worked! Opening Testrail showed a message saying we were now on version 6.0 and needed to perform a database update with a button to execute it and message clearly and intimidatingly asking me to confirm in writing that I took a DB backup before I can run it.

Hope this helps (if you or anyone else still needs it).