Closed danishzharfan closed 1 year ago
Seems to be bug on Heroku? Permission issue? Can't reproduce on local
@ADIBzTER Can you please help to check on server log if there's any error recorded? Can't reproduce on my local. thanks
POST 500 677B 5ms Firefox 111 https://uitmtimetable.skrin.xyz/api.php?exportexcel
The only log I found regarding this issue
@afzafri I found another one
"[Fri Mar 24 17:43:15.760125 2023] [php:error] [pid 20] [client 169.254.1.1:33419] PHP Fatal error: Uncaught Error: Class "ZipArchive" not found in /var/www/html/modules/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php:210\nStack trace:\n#0 /var/www/html/modules/excel_module.php(49): PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx->save()\n#1 /var/www/html/api.php(55): Excel->exportExcel()\n#2 {main}\n thrown in /var/www/html/modules/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php on line 210, referer: https://uitmtimetable.skrin.xyz/"
I think this caused by missing dependencies. Will try to look into the CI pipeline and fix it.
I see, need to install the PHP zip extension. Nevermind this is not priority. Thanks
Should be fixed in https://github.com/afzafri/UiTM-Timetable-Generator/commit/e203218c7dcd2c73a5e2018dde72618909b3add4 . Moved the Excel file read and write process to client side.
Need @ADIBzTER help to deploy latest update to server for testing. Thanks!
Deployed and works properly!
The error message that was sent is "There was an error when an Ajax request! HTTP Error Code :500"