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

1 Answer 1

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)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.