My situation:
I have a software composed of some compiled C++ daemons running in the background, a PHP/JS web interface and a CLI interface written in Python. Currently to send a Dbus command from PHP (web interface) to a daemon we use a python script to proxy the call, because python has a very mature Dbus implementation.
My Question:
There is any stable Dbus implementations to use withing PHP, compatible with Ubuntu Server/CentOs ?
What have I tried:
- The beta DBUS plugin in PECL that is not documented, still in beta, and complains about missing X11 envion (how is this good for servers ?).
- And then there is the GREE php-dbus extension that is not maintained, link to documentations redirects to a Japanese blog.
Thank you.
PHP executed on a web server (like Apache) can't do D-Bus requests at all. I'm trying for several days without success. This is because the web server user (like www-data
) can't access the dbus-daemon
via a session
connexion.
As a workaround I'm using the React built-in HTTP server. Exactly like you, but all in PHP. Your workaround is much more reliable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With