KReporter on SuiteCRM 7.8.5 403 error

Hello, we are supporting a client using SuiteCRM 7.8.5 on a shared hosting AWS Ubuntu Linux (14.04.5) server running Apache 2.4.23 and PHP 5.6.25.

We’ve installed the latest KReports and KREST from the spicecrm downloads area.

We can’t seem to get KReports to work. We disabled and deleted the modules, and reinstalled several times. When we check KREST/sysinfo we get a 403 error.

In preparation for a planned upgrade later this years, we’ve also installed SuiteCRM 7.9.4 on the same server with the latest KReports and KREST and it works fine; we can see all the installed modules, users, etc. KREST/sysinfo also responds with json data about the new system.

Any help would greatly be appreciated.

Jim

Jim,
it looks like you have a file permission problem.
Did you check KREST installation guide?
Val

Hi, yes, we’ve followed that. We’ve checked the folder permissions, even going so far as to give the KREST directory 777 permissions for all files and subdirectories.

The curious thing is that the KReporter and KREST module installs are being installed on the same machine. We can access KREST/sysinfo on 7.9.4 but not on 7.8.5.

Jim

Here’s the error message from apache error_log.

[Wed Aug 16 12:44:46.935450 2017] [rewrite:error] [pid 1494:tid 140517329282816] [client 1xx.xx.xx.xx:57214] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /opt/bitnami/apache2/htdocs/crm.kelemenandco.com/KREST/sysinfo

Added these options to our vhost config, restarted apache and getting this from KREST/info:

{"version":"2.0","extensions":{"login":{"version":"1.0"},"module":{"version":"2.0"},"core":{"version":"2.0"},"metadata":{"version":"1.0"},"user":{"version":"1.0"}}}

However, loading KReports, still shows a broken page and these errors (we’ve enabled error_reporting(E_ALL) in config.php:

Strict Standards: Declaration of KReport::save() should be compatible with SugarBean::save($check_notify = false) in /opt/bitnami/apache2/htdocs/crm.kelemenandco.com/modules/KReports/KReport.php on line 0

and

Strict Standards: Declaration of KReport::create_new_list_query() should be compatible with SugarBean::create_new_list_query($order_by, $where, $filter = Array, $params = Array, $show_deleted = 0, $join_type = '', $return_array = false, $parentbean = NULL, $singleSelect = false, $ifListForExport = false) in /opt/bitnami/apache2/htdocs/crm.kelemenandco.com/modules/KReports/KReport.php on line 0

KReports is saving reports and we can see a few we’ve attempted to create in the reports lists. But when we try to view or edit the reports we get a mostly blank page.

KReports DetailView

I’ll post the Edit view in another post following this one.

Jim

KReports Edit View

Did you turn off display_errors in php.ini?

error_reporting(E_ALL) will make large log files and will not help. We recommend error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING

Yes, display_errors is off in php.ini.

We know that error_reporting(E_ALL) does that. We’ve only turned on error reporting to troubleshoot this issue.

Jim

Well, what errors does javascript console throw?
KReporter is not designed to be compatible with SuiteCRM. The problem might be there.
Val

Here are the jscript errors from the dev console:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (config, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (whereinitialize, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (userprefs, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (plugins, line 0)
[Log] server-side failure with status code 404 (KReporterViewer.js, line 12)

BTW, we’ve had no issues with installing and using KReports in other SuiteCRM installs. It would be good if there was a warning about that on your website.

Sorry that copy and paste didn’t provide the missing file names. They are in the same order as in my post above, as follows:

http://xxx/KREST/KReporter/core/config?_dc=1502908273681
http://xxx/KREST/KReporter/core/whereinitialize?_dc=1502908273412
http://xxx/KREST/KReporter/user/userprefs?_dc=1502908273671
http://xxx/KREST/KReporter/plugins?_dc=1502908274020&addData=["currencies"%2C"sysinfo"]&report=4ad49b9d-4864-bc51-f443-59938553bc28

Jim

It’s becoming difficult to guess.
Does webuser have the rights to execute KREST?
Is the file KREST/extensions/KReporter.php available on server?

Val

I appreciate your help.

Yes, the file permissions are set to the Apache web user.

The KReporter.php was missing. I copied it from the earlier install (we renamed the directory) before removing and reinstalling KREST.

It seems to be working now.

Thanks.

Jim