且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何将jpeg支持添加到Heroku PHP buildpack中

更新时间:2022-10-18 18:53:53

目前的解决方法是安装 imagick.so - 编译了库和指令@ github https://github.com/alkhoo/heroku-cedar-php-extension
$ b

还编译了 apc.so ,因为它在Heroku的扩展中丢失了。由于Heroku的PHP已经在php * binary中编译了GD,因此 gd.so 扩展名无法使用。等待别人创建一个没有GD编译的PHP buildpack。



其他人编译 zlib.so mbstring.so (如果有人感兴趣)。

I am developping an app using Heroku. I will need to manipulate images but unfortunately jpeg is not supported by default. I spoke with support and here is their answer:

"We unfortunately don't support jpeg by default. But the good
news is that we open sourced our PHP buildpack, so hopefully the
community will be able to bring that in.

In case you're interested, the buildpack is here:
https://github.com/heroku/heroku-buildpack-php"

I know I need to add --with-jpeg just before the --with-gd in the ./configure of PHP

But the buildpack only gives the ability to update the php.ini and compile files and none of them contains the magic line to update (./configure...) ...

Is there is a way to add jpeg support through the two mentioned files ?

Current workaround is to install imagick.so - have compiled the library and instruction @ github https://github.com/alkhoo/heroku-cedar-php-extension

Also compiled apc.so since it is missing from Heroku's extension. The gd.so extension cannot be used since Heroku's PHP had GD compiled in php* binary. Waiting for someone to create a PHP buildpack without GD compiled.

Others have compiled zlib.so and mbstring.so (in case anyone is interested).