2012-03-05 97 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(如有人有興趣)。