-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
GD extension latest version support #192
Comments
How do you build your local docker image? What version of this library are you using in production? Here is everything related to the GD extension: https://github.com/brefphp/extra-php-extensions/blob/master/layers/gd/Dockerfile |
I've used laravel sail for local environment. Below are the Bref versions I have on production: I went to this GD extensions dockerfile but did not found a way how I can change the gd version from 2.1.0 to 2.3.0 Am I missing something? |
There are a two strange things I see:
Why did you expect them both to use the same version of GD? The GD extension is bundled with PHP. See https://www.php.net/manual/en/extensions.membership.php We may need to install the libgd and use that library (over the bundled one) when doing |
Yes, I use two different docker images. That was the quickest way I got started with both development & production working. Then later I've realized the gd version difference(sorry for creating confusion by posting my development environment details, I wanted to share my reason to upgrade gd). Then I started looking how I can upgrade GD version for bref, did found this bundled process complicated & ended up creating this ticket. Now, do you know how can we use PHP bundled GD here? |
We are using the bundled PHP GD. If we want to update the version we need to use an external GD lib. I tried to use Maybe @shouze could help? |
@mhetreramesh I'm not sure but maybe you can try to upgrade to bref 1.2.1 and get lucky for a bundled gd upgrade. If not, I guess that we can ask @mnapoli to push up to date bref docker build images (at least 1.2.0 or 1.2.1) that we could also use as base images to build gd ext in this repo. |
@mhetreramesh also, could you please give the name of your local laravel sail base image used for local development? Anyway I guess it's not a very good option to use it and prefer instead using official bref images if you want to be in sync on every php points (php versions, ext versions, php settings) and avoid a lot of surprises over time between local development and your deployments envs. |
What feature in GD 2.3.0 are you using that does not exist 2.1.0? Ie, why is the update needed? |
To be honest, I exactly don't know if the GD version is the root cause of my problem. I am using intervention/image to manipulate images(Adding different layers on images). I saw a visible difference in the generated images on local vs production(the production version is buggy). Then I looked into configuration difference & found out that GD version difference is the only thing which seems to be a big difference, so I thought of updating it. |
The local sail image is FROM ubuntu:20.04, here is gist of sail dockerfile Going with the sail for local dev environment was easy start back then, but now I've realized to spend more time making proper dev setup which is using bref docker images. I've tried updating to latest bref version, no luck with that. |
Using |
Update: I tried with the recent versions of my all packages from bref & this issue seems to be still existing. I'm sure the latest GD version will be used in bref soon in the mean time I've moved my that specific service back to EC2 traditional way. As soon as the update is there, I'll move back to Lambda again. Thanks for your help! ❤️ |
I use a lambda function to generate images backed by bref. Internally I've used gd library & gd lambda layer.
Functionally, everything works fine but there is a difference between generated image on lambda function & local. I did a more detailed investigation & found out that the gd library version on production is different than local. I suspect that can be the issue in my case.
Local docker GD version
Bref lambda production GD
I was trying to look into a way to upgrade GD library version, it would be great if I get some directions. I'll try to send a PR.
The text was updated successfully, but these errors were encountered: