-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fatal error in file.php when using PHP 8.2.0beta1 #2970
Comments
That sounds like your build of PHP 8.2 isn't built with the ext-zip extension If you built it yourself, please follow the instructions from the PHP docs |
Thanks for the comment Mark. I did not build it myself but I will go back to the packager and see if perhaps they missed it in their build. Comparing the registered streams from 8.1.8 to 8.2.0beta1 I do see that zip is not in the beta so this does indeed seem to be a PHP issue. |
This is:
What is the expected behavior?
The spreadsheet should be read and processed without error.
What is the current behavior?
A fatal error is thrown when using PHP 8.2.0beta1 - the same code does not produce an error when using PHP 8.1.8.
PHP Fatal error: Uncaught Error: Class "ZipArchive" not found in phpspreadsheet\src\PhpSpreadsheet\Shared\File.php:63
Stack trace:
#0 \phpspreadsheet\src\PhpSpreadsheet\Shared\File.php(183): PhpOffice\PhpSpreadsheet\Shared\File::fileExists('zip://\DEQ\Bent...')
#1 \phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php(77): PhpOffice\PhpSpreadsheet\Shared\File::testFileNoThrow('\DEQ\Benthos\Pl...', '_rels/.rels')
#2 \phpspreadsheet\src\PhpSpreadsheet\IOFactory.php(149): PhpOffice\PhpSpreadsheet\Reader\Xlsx->canRead('\DEQ\Benthos\Pl...')
#3 \phpspreadsheet\src\PhpSpreadsheet\IOFactory.php(110): PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile('\DEQ\Benthos\Pl...', NULL)
#4 Load_Benthic_Data.php(132): PhpOffice\PhpSpreadsheet\IOFactory::identify('\DEQ\Benthos\Pl...')
#5 {main}
thrown in \phpspreadsheet\src\PhpSpreadsheet\Shared\File.php on line 63
The file being processed is not a ZIP file, it is an xlsx file.
What are the steps to reproduce?
What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
Only tested with .xlsx files.
Which versions of PhpSpreadsheet and PHP are affected?
PHP 8.2.0beta1 and PhpSpreadhseet 1.24.1 (earlier versions were not tried)
BugReportData.xlsx
.
The text was updated successfully, but these errors were encountered: