No FreeType support in PHP 8.1 on Amazon Linux 2 / Elastic Beanstalk?

0

I have an Elastic Beanstalk app running on PHP 8.1. However, there is no FreeType support, even though I have both GD and libfreetype installed on the EC2 instances. All of the instructions I can find on the web say you have to recompile PHP with FreeType (--with-freetype) in order to turn it on. Obviously, I don't want to have an unsupported, hand-built PHP installation on EB if I can avoid it. That's the whole point of Elastic Beanstalk.

Can anyone tell me how to add GD with FreeType support on PHP 8.1 on Amazon Linux 2 without having to recompile? Or, can anyone from AWS make sure it gets added to the EB images? This is a major missing feature. Thanks.

질문됨 2년 전539회 조회
4개 답변
2

This isn't a complete answer (only AWS can fix that in php). But, there may be a work-around for you. The php 8.0 in Beanstalk does have GD and FreeType included:

php -i | grep -E "GD|FreeType"
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.8.0

I posted a comment 5 days ago that php 8.1 was also missing "pcntl" support. It had been supported in prior php versions in Beanstalk. Looks like the AWS team significantly changed the php options in 8.1. I never saw any docs about these breaking changes.

답변함 2년 전
1

+1

We also need AWS to add this flag added to next version of PHP 8.1 in EB. Doesn't seem possible to replace the bundled GD so I'm having to recompile all of PHP when deploying (which of course isn't efficient)

Many thanks!

답변함 2년 전
0
수락된 답변

Looks like AWS fixed this in Beanstalk platform v3.4.1

php --version
PHP 8.1.9 (cli) (built: Aug 23 2022 21:25:19) (ZTS)

php -i | grep -E "GD|FreeType"
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.8.0

PS: They also added my "pcntl" support I mentioned was missing

답변함 2년 전
0

Wow! They actually fixed it. I see it enabled on mine which auto-updated. Thank you, AWS!

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠