How can I add jpeg support to Heroku PHP buildpack

核能气质少年 提交于 2019-12-18 03:48:02

问题


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 ?


回答1:


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).



来源:https://stackoverflow.com/questions/9573916/how-can-i-add-jpeg-support-to-heroku-php-buildpack

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!