dongzhong5756 2017-01-20 07:32
浏览 106
已采纳

PHP静态二进制 - 带有inotify扩展

I recently found out how to build a standalone php binary (here), which works great!

Is there a way to include the inotify extension into this binary?

I dont find any documentations about building php with inotiy, only about extend php with the "pecl extension" inotify - may this is the problem, its a pecl extension and therefore not includable into the php binary?

is there another approach to deliver the binary with this inotify extension (except normal php installation)?

Target is, to deliver a php cli application, which is independent of the installed php version of the destiantion server (which works great till now, until we would need the inotify extension in php..)

  • 写回答

1条回答 默认 最新

  • douqiao7958 2017-01-20 10:15
    关注

    I just found this pretty documentation, which solved my problem. INotify (and all other modules) works with the single static binary, compiled (in debian 7) via:

    ./configure --enable-static --enable-cli --enable-inotify --with-openssl --with-openssl-dir=/usr/bin

    complete progress:

    • download /etxtract php711 source
    • download /extract inotify module
    • rename inotify folder to "inotify"
    • mv inotify folder to {phpsrc}/ext/inotify
    • change dir to {phpsrc}
    • rm configure
    • ./buildconf --force
    • ./configure --enable-static --enable-cli --enable-inotify --with-openssl --with-openssl-dir=/usr/bin
    • make
    • have fun with the stand alone php cli binary located @ {phpsrc}/sapi/cli/php

    The binary even works with other distributions (short tested in centos 6 and latest arch)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)