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

salamaslam.official's avatar

DomPDF - Trying to run require barryvdh/laravel-dompdf, but facing issues

Hi Community,

I am trying to run the following command for PDF work but facing some extension installation issue

Problem 1 - phpoffice/phpspreadsheet 1.21.0 requires ext-zip * -> it is missing from your system. Install or enable PHP's zip extension. - maatwebsite/excel 3.1.36 requires phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.21.0]. - maatwebsite/excel is locked to version 3.1.36 and an update of this package was not requested.

To enable extensions, verify that they are enabled in your .ini files: - /opt/alt/php80/etc/php.ini - /opt/alt/php80/link/conf/alt_php.ini You can also run php --ini in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with --ignore-platform-req=ext-zip to temporarily ignore these required extensions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require barryvdh/laravel-dompdf:*" to figure out if any version is installable, or "composer require barryvdh/laravel-dompdf:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

But this command works fine in localhost, but not working on CPanel.

Get stuck, Please Help

0 likes
1 reply
salamaslam.official's avatar
Level 1

Issue resolved with only this command composer require barryvdh/laravel-dompdf --ignore-platform-req=ext-zip

Please or to participate in this conversation.