The purpose of this section in the documentation is to guide users through essential checkpoints to consider when encountering any issues during the report generation process with Smart Report Engine. Additionally, we will explore Smart Report Engine's logging feature, which assists in troubleshooting potential problems that may arise in the generated reports.
When generating a new report with Smart Report Engine, it is crucial to ensure that the system has the necessary read/write permission (755 in Linux) for the `/sre_reports` directory. This permission allows the system to create a configuration file for the report and store the selected report options within it. The system automatically places each report's configuration file in a subdirectory under `/sre_reports`, following this format: `/sre_reports/your_new_report/config.php`.
To avoid permission errors, it is essential to verify the permission settings for the Apache user in the `/sre_reports` directory. To identify the Apache user on a Linux system, use the following command:
ps -ef | grep apache
Verify that the Apache user has the required permissions for the `/sre_reports` directory using the following command:
ls -l /sre_reports
The output will display the directory's permissions, owner, group, and other details. Ensure that the Apache user has read (r), write (w), and execute (x) permissions (755) for the directory. If the permissions need adjustment, use the `chmod` command accordingly. Please exercise caution when modifying permissions to maintain security.
It is crucial to ensure the correct import of Smart Report Engine's namespaces and the proper inclusion of the autoloading script while requiring it. Smart Report Engine offers two installation modes. If you download it manually (without using Composer), the autoloading script is named "sre_bootstrap.php" and can be located in the root of the downloaded package. When utilizing the `require` or `require_once` statement, ensure you provide the accurate path to this script for smooth functionality.
On occasions, users might come across problems not stemming from inadequate read/write permission, as noted in Point 1, but rather from the absence of execute permission in some or all PHP files of Smart Report Engine. Ensuring that the necessary files have the appropriate execute permission is essential to avoid any potential challenges during the system's operation.
To ensure smooth functioning, it is essential to validate the correctness of the MySQL username, password, server, and database name in the corresponding fields within the configuration file located at `/sre_config/config.php`.
Moreover, confirm that the MySQL user used in the configuration has the necessary "Select" permission on the database tables. "Select" permission is sufficient for the system to operate effectively.
If you intend to run the examples provided in the community edition, import the SQL file included with this version. Once imported, use the connection string of the imported database to ensure seamless execution of the examples.
Smart Report Engine offers a beneficial logging feature that facilitates the identification of issues in generated reports. By activating this feature, you can promptly diagnose any potential problems that may occur. The logging functionality can be enabled for individual reports or applied globally to all reports.