mk-j / PHP_XLSXWriter

Lightweight XLSX Excel Spreadsheet Writer in PHP
MIT License
1.84k stars 663 forks source link

Question: Requirements on Docker #347

Open sh-at-bergnet-de opened 1 year ago

sh-at-bergnet-de commented 1 year ago

I have written an app with an Excel output. When I use it with DDEV (PHP 8.2, MariaDB 10.6, otherwise default settings) everything works as desired. However, if I start the app with Docker there are problems opening it in MS Excel. However, 7zip can unzip the file and alternative programs open the file without problems.

The Docker image is based on php:8.2-apache . I suspect an external dependency, so I compared the loaded modules and adjusted some, e.g. bz2, unfortunately without success. In the following list modules that are loaded in DDEV but Docker are not marked with a dot / plus-sign. Maybe someone here has an idea what I need to adjust to make it work?

[PHP Modules]

[Zend Modules]

mk-j commented 1 year ago

"if I start the app with Docker there are problems opening it in MS Excel". An xlsx file is just a zip file. Open your xlsx/zip file in a hex editor or text editor and see if there are any php errors before the PK \x50\x4b\x03\x04 header. Its usually php.ini settings like display_errors=On or a /tmp dir issue that corrupt these files.