2012-03-05 73 views
1

我正在开发一个使用Heroku的应用程序。我将需要操作图像,但不幸的是默认情况下不支持jpeg。我支持讲,这里是他们的回答:如何添加jpeg支持Heroku PHP buildpack

"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

只是--with-gd之前添加--with-jpeg但buildpack只给出更新PHP的能力。 INI编译文件,其中没有包含魔线更新时(./configure ...)...

有没有一种方法可以添加jpeg支持通过上面提到的两个文件?

+0

现在,Heroku上的PHP支持是官方的,并且有一个官方且维护良好的buildpack,您可以将ImageMagick包含在[composer.json](https://github.com/delight-im/Heroku-PHP -Apache2/blob/master/composer.json)文件作为'ext-imagick',或使用'ext-gd'。 – caw 2014-07-05 00:46:06

回答

3

当前的解决办法是安装imagick.so - 编译库和指令@githubhttps://github.com/alkhoo/heroku-cedar-php-extension

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

其他已编译zlib.sombstring.so(如有人有兴趣)。