如何向Heroku PHP buildpack添加jpeg支持
我正在使用Heroku开发一个应用程序。我需要处理图像,但遗憾的是默认情况下不支持如何向Heroku PHP buildpack添加jpeg支持,php,heroku,gd,php-ini,Php,Heroku,Gd,Php Ini,我正在使用Heroku开发一个应用程序。我需要处理图像,但遗憾的是默认情况下不支持jpeg。我表示支持,以下是他们的回答: "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 inte
jpeg
。我表示支持,以下是他们的回答:
"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"
我知道我需要在PHP的/configure
中的/gd>之前添加——使用jpeg
但是buildpack只提供了更新php.ini和编译文件的功能,并且没有一个包含要更新的魔行(./configure…)
有没有办法通过上述两个文件添加jpeg
支持?当前的解决方法是安装imagick。因此
-编译了库和指令@https://github.com/alkhoo/heroku-cedar-php-extension
还编译了apc.so
,因为它在Heroku的扩展中丢失了。无法使用gd.so
扩展名,因为Heroku的PHP使用PHP*二进制文件编译了gd。正在等待有人在未编译GD的情况下创建PHP buildpack
其他人已经编译了zlib.so
和mbstring.so
(以防有人感兴趣) 既然Heroku上的PHP支持是官方的,并且有一个官方的、维护良好的buildpack,那么您可以将ImageMagick作为ext-imagick
包含在文件中,或者使用ext-gd
。