First of all, do you have a dbus method you are trying to call? Dbus is merely the transportation layer, you need a program that hosts a dbus method and a program that calls a dbus method. I'll assume you have a dbus method you want to call from your php program.
How is apache trying to call your dbus method? If you are using a system() method or similar from php to call qdbus, that will fail. PHP is run by apache, apache does not have an autologin dbus process like your user does and no X11 access. This means in order for your apache to have dbus, you have to use:
eval 'dbus-launch --auto-syntax' [command]
when using PHP's system(). That is not optimal though.
Some solutions are:
- Run apache as your user.
- Run dbus on the system bus and expose the methods and allow apache to call them from the dbus configuration file. This requires root access, which can complicate matters.
- Research if exposing a session dbus method to other users works. Optimally there should be a dbus-php library you can use. I'm pretty sure as long as apache can call dbus methods, having an xml file in the dbus config folder exposing it should work.