Page 1 of 1

Internal Record Error (I can't add new Contacts!)

Posted: 04 Jul 2023, 02:13
by zoomiest
When I try to add new contacts, I get:
Code: Select all
The internal mechanics CATS uses to add and edit records like candidates, companies, job orders, etc. failed on your last operation. You may have entered incorrect data that it's not used to handling or there is an internal issue.

The administrators have been notified and will resolve the issue as soon as possible. We apologize for the inconvenience. 
.

Source of CATS code: Downloaded from Github. Dependancies supplied by Composer
Server OS: Ubuntu 22.04.2 LTS
DB: MariaDB 10.6.12
Webserver: Apache/2.4.52

WebLogs
[Mon Jul 03 15:26:21.182915 2023] [php7:notice] [pid 54854] [client 23.17.234.209:41154] PHP Notice: Undefined index: isHot in /var/www/html/ats/modules/candidates/CandidatesUI.php on line 3461, referer: https://stratosphere.team/ats/index.php ... teID=32349
[Mon Jul 03 15:26:21.183138 2023] [php7:notice] [pid 54854] [client 23.17.234.209:41154] PHP Notice: Undefined index: isHot in /var/www/html/ats/modules/candidates/CandidatesUI.php on line 3461, referer: https://stratosphere.team/ats/index.php ... teID=32349
[Mon Jul 03 15:26:21.183366 2023] [php7:notice] [pid 54854] [client 23.17.234.209:41154] PHP Notice: Undefined index: isHot in /var/www/html/ats/modules/candidates/CandidatesUI.php on line 3461, referer: https://stratosphere.team/ats/index.php ... teID=32349
[Mon Jul 03 15:26:21.185355 2023] [php7:error] [pid 54854] [client 23.17.234.209:41154] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/ats/modules/candidates/CandidatesUI.php on line 3451, referer: https://stratosphere.team/ats/index.php ... teID=32349
[Mon Jul 03 17:49:03.260901 2023] [php7:error] [pid 55236] [client 87.120.84.173:64240] script '/var/www/html/xmlrpc.php' not found or unable to stat
[Mon Jul 03 18:59:01.317258 2023] [php7:warn] [pid 56431] [client 23.17.234.209:50528] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/ats/modules/companies/Show.tpl on line 311, referer: https://stratosphere.team/ats/index.php ... nies&a=add
[Mon Jul 03 18:59:01.317381 2023] [php7:warn] [pid 56431] [client 23.17.234.209:50528] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/ats/modules/companies/Show.tpl on line 349, referer: https://stratosphere.team/ats/index.php ... nies&a=add
[Mon Jul 03 18:59:01.317399 2023] [php7:warn] [pid 56431] [client 23.17.234.209:50528] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/ats/modules/companies/Show.tpl on line 393, referer: https://stratosphere.team/ats/index.php ... nies&a=add

Do you make any sense out of these error messages?

Re: Internal Record Error (I can't add new Contacts!)

Posted: 04 Jul 2023, 12:12
by RussH
yes - as I have been doing some test versions that are PHP 7,4 or 8.2 compatible - those are errors that a newer PHP will generate when it sees the old code. So I think you're running at least PHP 7.4 (and right now, needs to be only PHP 7.2)

Re: Internal Record Error (I can't add new Contacts!)

Posted: 04 Jul 2023, 14:25
by zoomiest
I am actually running PHP Version 7.2.34-39+ubuntu22.04.1+deb.sury.org+1

Is that too high?

However, I did install phpMyAdmin from the command line, and it loaded PHP 8.2. I uninstalled it, but... it may have made some changes.

I am however using a database schema from past versions of CATS, which has extra fields, etc. Will that cause me some trouble? (likely!)

1) Do I need to load my data on to a fresh, native OpenCATS schema of tables?
2) Should I reinstall OpenCATS fresh, with proper PHP 7.2 ? (this would only take an hour - vs. fighting it for weeks)
Update: residual PHP8.2 has been removed. webserver and db restarted. Problem persists.

Re: Internal Record Error (I can't add new Contacts!)

Posted: 04 Jul 2023, 15:41
by RussH
It sounds like you're using Ubuntu, if so - can you run
Code: Select all
update-alternatives --config php 
and check you have it set to php 7.2

also -
Code: Select all
a2dismod php8.2
then
Code: Select all
a2enmod php7.2
..and then restart apache

Re: Internal Record Error (I can't add new Contacts!)

Posted: 04 Jul 2023, 15:43
by RussH
If this doesn't work I may have to offer to ssh on for you, seems odd. I have of course checked and MY version 0.9.7.2 works :roll:

Re: Internal Record Error (I can't add new Contacts!)

Posted: 07 Jul 2023, 22:02
by zoomiest
I reinstalled OpenCATS, and used a native database, and now everything is fine. I suspected that it was the legacy database that I was using. Now, I need to bring the data over, by queries...