I'm trying to connect to DBus from a PHP program.
When I run the program from command-line, it works, but when it is run by the Apache webserver (running as user apache
) it cannot connect to the bus.
I tried both calling qdbus
with system
and calling a Python script using python-dbus, but it doesn't work in either way. Also, I cannot manage to compile this PHP extension, but I don't think that it will solve my problem.
I think that the problem is that the DBus daemon that provides the session bus is running as my user (the system bus one is running as messagebus
), but PHP runs as apache
.
How can I do to connect to the other user's bus?
(This is not working for me.)