a month ago
Hi Railway team,
Previously, my Laravel deployments on Railway worked correctly without needing to manually install additional PHP extensions. However, in recent deployments, when running composer install, I get errors indicating that the PHP extensions gd and exif are missing:
phpoffice/phpspreadsheet requires ext-gd
spatie/image requires ext-exif
spatie/laravel-medialibrary requires ext-exif
This prevents the project from being installed correctly.
I would like to know:
If there have been any recent changes to Railway’s PHP images that now require these extensions.
The recommended way to enable them so that my Laravel deployments work as before.
Any alternatives if I want to keep the deployment working without creating a custom Dockerfile.
I would appreciate your guidance to resolve this issue and continue deploying without errors.
Thank you in advance!
3 Replies
a month ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
a month ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open jake • about 1 month ago
a month ago
Would you mind checking for me that your old deploy was on Nixpacks, and this new one is on Railpack? I think it might be a regression with the provider as we cutover
a month ago
Railpack does not ignore platform reqs when installing with composer (as opposed to our legacy builder). This is recommended when deploying PHP applications in production. To fix the error you are seeing, you need to configure the build to install the missing zip, gd, and exif extensions. You can do that by setting the environment variable RAILPACK_PHP_EXTENSIONS=zip,gd,exif, or by adding these extensions to your composer.json file (docs here).