D-BUS and PHP backend

@4u fd4u at vplace.de
Thu Feb 14 11:48:55 PST 2008


Hi,

Curtis Maloney schrieb:
[snip]
> Personally, I'd recommend using anything other than PHP, but that's a 
> personal bias (I see no place for PHP in the world :).
[snip]

Well - even if I don't see a reason for this opinion - individual
developers as well as large companies are using PHP and benefit from its
nature - I'll continue to use this thread to announce some progress for
the native D-BUS PHP binding.

I just committed the initial implementation of the EXTERNAL and
ANONYMOUS authentication method to:
http://phpwe.cvs.sourceforge.net/phpwe/sWG_complete/socketdbus/system/classes/ext_dbus/

I implemented it as a part of another project (called sWG - secured
WebGine) but in an independently way. Please ignore some special
comments or markups in the dbus_session.php file. Unfortunately their
seems to be a bug or something "strange" with the abstract namespace
implementation of UNIX sockets in PHP. I'm still investigating it
(please have a look at the php-general mailing list). For that reason I
can't implement DBUS_COOKIE_SHA1 right now.

The current code does only implement the authorisation protocol. I'll
now continue to add the binary part as this proof of concept is
completed and working. Please feel free to register at sourceforge.net.
I'll add an issue tracker to http://www.sourceforge.net/projects/phpwe
to accept bug reports and patches :).

The current design is PHP4 compatible but uses PHP5 class syntax
alternately. It should be compatible with all PHP versions since 4.3.0.
If you backport "stream_set_blocking ()" to "socket_set_blocking ()" it
should be compatible with 4.0.7 onwards.

Thought you may run it with ancient PHP versions I will only support
PHP5+ officially.

Right now I'm going to implement only client side functionalities. As
meant by Maloney (maybe?) PHP is not the right language for server side
features. You will be able to use it for example to query HAL daemon,
pidgin, Beagle or other supported D-BUS applications.

Best regards
Tobias


More information about the dbus mailing list