Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

alex29's avatar

Cannot download excel file on production server but works on local

Hello all, I am using this package maatwebsite/excel to export excel files and it works fine on my local machine but stops working on my production server. In the docs, it is stated that the ff should be enabled: php_zip, php_xml, and php_gd2. I am not entirely sure though if I have them enabled but I did however install them with sudo apt-get install php7.2-zip sudo apt-get install php7.2-xml and sudo apt-get install php7.2-gd. Is there anything else I should do? I am also not receiving any errors when triggering the download. In fact, it returns a 200 response.

0 likes
3 replies
siangboon's avatar
Level 54

to double check what is installed at your server you can simply create a dummy file and write a line of code

<?php

    phpinfo()

check the log file for more information

alex29's avatar

@siangboon Hi, thanks for responding. I did as you told but what exactly am I looking for?

Edit: I tried checking with php -m and saw that zip, xml, and gd are all enabled. I am running out of ideas.

siangboon's avatar

check the log each time you execute it and dd() any expected value or information at any suspicious point before the error...

Please or to participate in this conversation.