如何向 Heroku PHP buildpack 添加 jpeg 支持 [英] How can I add jpeg support to Heroku PHP buildpack

查看:36
本文介绍了如何向 Heroku PHP buildpack 添加 jpeg 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Heroku 开发应用程序.我需要处理图像,但不幸的是 jpeg 默认不支持.我得到了支持,这是他们的回答:

不幸的是,我们默认不支持 jpeg.但是好的新闻是我们开源了我们的 PHP buildpack,所以希望社区将能够将其引入.如果您有兴趣,构建包在这里:https://github.com/heroku/heroku-buildpack-php"

我知道我需要在 PHP 的 ./configure 中的 --with-gd 之前添加 --with-jpeg

但是 buildpack 只提供更新 php.inicompile 文件的能力,并且它们都不包含要更新的魔法线 (./configure...) ...

有没有办法通过提到的两个文件添加 jpeg 支持?

解决方案

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

还编译了 apc.so,因为 Heroku 的扩展中缺少它.gd.so 扩展不能使用,因为 Heroku 的 PHP 已经在 php* 二进制文件中编译了 GD.等待有人创建一个没有 GD 编译的 PHP buildpack.

其他人已经编译了 zlib.sombstring.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).

这篇关于如何向 Heroku PHP buildpack 添加 jpeg 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆