Unable to save fields to existing or new reports

Following a successful migration to a new sever, we are unable to save fields to new or existing reports. The only error log I can find is shown below,

[Mon Jun 07 21:37:08.357105 2021] [proxy_fcgi:error] [pid 4027:tid 140035261200128] [client 192.156.217.82:65160] AH01071: Got error ‘PHP message: PHP Warning: Declaration of SugarDateTime::setTime($hour, $minute, $sec = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL) in /var/www/html/suitecrm/include/SugarDateTime.php on line 651PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 2349PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 2349PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 2349PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 2349PHP message: PHP Notice: Trying to access array offset on value of type bool in /var/www/html/suitecrm/data/Relationships/One2MRelationship.php on line 109PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 3382PHP message: PHP Notice: Trying to access array offset on value of type bool in /var/www/html/suitecrm/data/Relationships/One2MRelationship.php on line 109PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 3382PHP message: PHP Notice: Trying to access array offset on value of type bool in /var/www/html/suitecrm/data/Relationships/One2MRelationship.php on line 109PHP message: PHP Notice: Array to string conversion in /var/www/html/suitecrm/data/SugarBean.php on line 3382’, referer: https://testmonet.nag.co.uk/suitecrm/index.php?module=AOR_Reports&action=DetailView&record=9569f8b8-91b3-6a63-e69d-60be24f1fad8

Can anyone offer any advice?

Regards,
Paul

Check your PHP version and the Compatibility Matrix:

@pgr
I checked my PHP version as suggested, I was using 7.4 which accorsding to the Matrix is not compatible with SuiteCR< 7.4.x.
I installed PHP 5.6, but I am not 100% how I can confirm that SuiteCRM is using the old version.
#php -v shows 5.6
the output from php -i | grep “Loaded Configuration File”
#Loaded Configuration File => /etc/php/5.6/cli/php.ini

I have updated the “include” line in my virtual hosts.

However, I am still unable to add fields to new or existing reports. All existing reports are fine, I can view the fields, it just when I add a new field where I see the problem.

There are two distinct PHP’s for command-line (CLI) and for web server.

To see what version your SuiteCRM is using (from Web server), you can check Admin / Diagnostics / phpinfo

@pgr
Thank you for your reply.
I am confused, I followed the instructions to completely remove PHP 7.4, I also deleted the directory /etc/php/7.4.
Yet still the Admin /Diagnosis/phpinfo reports,

Configuration File (php.ini) Path /etc/php/7.4/fpm
Loaded Configuration File /etc/php/7.4/fpm/php.ini

Is there something I missed?

Changes in PHP require a web server restart.

You can have multiple PHPs installed in your system, you tell Apache (if it is apache) which one you want using the command a2enmod (and a2dismod to disable).

Thats exactly what I did and the system reports that the loaded config file
#Loaded Configuration File => /etc/php/5.6/cli/php.ini

hence my confusion because SuiteCRM still reports that its using 7.4.

You probably changed it for CLI, and not for Web server.

@pgr
Thats it, you cracked it!
I renamed /etc/apache2/ conf-available/php7.4-fm.conf
The Web server started using the older version of php

Thank you very much for your help, you have saved me a great deal of time.

1 Like