2

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

Community
  • 1
  • 1
eXe
  • 662
  • 11
  • 26

1 Answers1

1

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)

eXe
  • 662
  • 11
  • 26