Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run reports. PHP error reported. #352

Open
AKGhost opened this issue Feb 27, 2024 · 1 comment
Open

Unable to run reports. PHP error reported. #352

AKGhost opened this issue Feb 27, 2024 · 1 comment

Comments

@AKGhost
Copy link

AKGhost commented Feb 27, 2024

Using the current version of icehmr from the git clone and using docker image as listed on the main code page. No error on webpage, does not show even more than the processing for a few seconds before going back to the report screen. So far all other pages work fine. using Admin account to replicate issue. Error log posted in linux console of docker output. Am using the open source non-paid version. Thank you for any assistance you can provide.

icehrm-prod-1 | NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: fputcsv(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php:71
icehrm-prod-1 | Stack trace:
icehrm-prod-1 | #0 /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php(71): fputcsv()
icehrm-prod-1 | #1 /var/www/html/core/src/Classes/ReportHandler.php(87): Reports\Admin\Api\ReportBuilder->createReportFile()
icehrm-prod-1 | #2 /var/www/html/core/src/Classes/ReportHandler.php(37): Classes\ReportHandler->generateReport()
icehrm-prod-1 | #3 /var/www/html/core/service.php(78): Classes\ReportHandler->handleReport()
icehrm-prod-1 | #4 /var/www/html/app/service.php(3): include('...')
icehrm-prod-1 | #5 {main}
icehrm-prod-1 | thrown in /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php on line 71
icehrm-prod-1 | [2024-02-27 07:20:17] ICE Hrm.ERROR: (client=icehrm) {"type":1,"message":"Uncaught TypeError: fputcsv(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php:71\nStack trace:\n#0 /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php(71): fputcsv()\n#1 /var/www/html/core/src/Classes/ReportHandler.php(87): Reports\Admin\Api\ReportBuilder->createReportFile()\n#2 /var/www/html/core/src/Classes/ReportHandler.php(37): Classes\ReportHandler->generateReport()\n#3 /var/www/html/core/service.php(78): Classes\ReportHandler->handleReport()\n#4 /var/www/html/app/service.php(3): include('...')\n#5 {main}\n thrown","file":"/var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php","line":71} [] []
icehrm-prod-1 | 10.13.37.26 - - [27/Feb/2024:01:50:17 +0000] "POST /app/service.php HTTP/1.1" 500 5 "http://--redacted--:3128/app/?g=admin&n=reports&m=admin_Admin_Reports" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" "-" 0.037 0.037 . -
icehrm-prod-1 | 2024/02/27 01:50:17 [error] 9#9: *70 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: fputcsv(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php:71
icehrm-prod-1 | Stack trace:
icehrm-prod-1 | #0 /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php(71): fputcsv()
icehrm-prod-1 | #1 /var/www/html/core/src/Classes/ReportHandler.php(87): Reports\Admin\Api\ReportBuilder->createReportFile()
icehrm-prod-1 | #2 /var/www/html/core/src/Classes/ReportHandler.php(37): Classes\ReportHandler->generateReport()
icehrm-prod-1 | #3 /var/www/html/core/service.php(78): Classes\ReportHandler->handleReport()
icehrm-prod-1 | #4 /var/www/html/app/service.php(3): include('...')
icehrm-prod-1 | #5 {main}
icehrm-prod-1 | thrown in /var/www/html/core/src/Reports/Admin/Api/ReportBuilder.php on line 71" while reading response header from upstream, client: --redacted---, server: _, request: "POST /app/service.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "--redacted---:3128", referrer: "http://--redacted---:3128/app/?g=admin&n=reports&m=admin_Admin_Reports"

@marczerbo
Copy link

same issues after switching from php 8.1 to php 8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants