Scheduled reports email details different than in the system

Hi!

We are encountering strange behaviour with scheduled reports functionality:

  • report in the system works fine
  • scheduled reports entry created with all necessary input: which report, when to be sent to an email, list of recepients…
  • email is sent to all recepients exactly as scheduled

Now comes the problem:

  • information in the email body is different than in report generated in the system, and these differences include:
    • missing records (records that are present in system generated report and not listed in email body),
    • wrong records (in email body some records that are not in the system generated report appear)

I would highly appreciate some suggestions or fix if anyone encountered this strange behaviour with this module.

Many thanks in advance and have a great day!

Mario

Hi,
don’t know the solution, just a wild guess: is it possible that the receivers are system users and that the report uses their roles/securitygroups?

Hi,

thx for you reply.

Yes, some users are system users as well, but those have all privileges to see those records.
I put also a recepient that is not a system user, and have the same behaviour…

Any other idea? :wink:

Have a great day!

Mario

One kind of report runs from the Web server PHP, the other from the CLI PHP. Your configuration can have lots of differences since they might be using different executables, different modules, different php.ini

So you could check that, see if your CLI PHP is the same version and same config.

Hi,

thx for your reply.

I am not sure how to do what you suggested, and would highly appreciate some more details/instruction how to and what exactly to check + where to find items to be checked, as I do not have full access to my server and might need give some instructions to sysadmin of the server…

Thank you again and have a great day!

Mario

This is beyond the purpose of these forums, because it is general web server administration.

Bu if a least you can use a console, you can easily get the properties of your CLI install.

Get version:
php -v

Get php.ini path:
php -i | grep php.ini

You can filter that output for any other property:
php -i | grep timezone

Then you can compare this with what you find in the web server PHP, which you can get from Admin / Diagnostics / phpinfo

Hi,

we compared php.ini on web and cli and these are differences (I think non of those should influcence on this?) + timezones are the same on both:

---
~# diff /etc/php/7.2/fpm/php.ini /etc/php/7.2/cli/php.ini
315c315
< disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
---
> disable_functions =
376c376
< expose_php = Off
---
> expose_php = On
385c385
< max_execution_time = 600
---
> max_execution_time = 30
406c406
< memory_limit = 512M
---
> memory_limit = -1
462c462
< error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_DEPRECATED
---
> error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
674c674
< post_max_size = 100M
---
> post_max_size = 8M
827c827
< upload_max_filesize = 90M
---
> upload_max_filesize = 2M

Maybe just try adding to that max_execution_time, especially if you know your reports might take more than 30 seconds to generate.

That disabled_functions might also be causing problems.

In the first case, you would see signs in suitecrm.log if turned on Log slow queries and put your log level in debug.

In the second case, you would see signs in your PHP log, usually called php_errors.log