News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Robert Basic's Blog:
Listening to Dbus signals with PHP
December 26, 2011 @ 11:23:41

Robert Basic has posted a follow up to his first post about using DBase in PHP in this new post. This new tutorial shows you how to listen to signals sent to the waiting PHP script.

The good part is that not can we only call different methods against Pidgin's libpurple API, we can also listen to different signals on different events, that are sent via Dbus. [...] The PHP Dbus extension allows us to watch for one exact signal on an interface, or for all signals on an interface. Of course, we can add watches on multiple interfaces at once.

In his example he shows how to set a listener on the session to watch for an incoming instant message from another source. Sample code is included showing how to set the listener on the interface and be able to tell when a message comes in (watching a $signal interface for an event). You can find more signal catching examples in his github repository.

0 comments voice your opinion now!
dbus signal listen tutorial extension


Chris Jones' Blog:
PHP OCI8 Signal Handling and --enable-sigchild
March 25, 2009 @ 10:22:51

Chris Jones has changed his stance on something he's been recommending PHP users compiling the OCI8 libraries into their installation - the use of enable-sigchild.

I am no longer blindly recommending using --enable-sigchild when configuring PHP with the OCI8 extension. I used to do this as a catch-all. It might have saved some users grief, and did little harm. With changes in recent versions of Oracle and my gut feel about common usage, it will be less confusing not to mention it as a general suggestion.

The point of using the compile flag was to help with the opening/closing of connections to Oracle server processes, but there's a better way he recommends now - using a "BEQUEATH_DETACH" option of "YES" in the sqlnet.ora/Apache config. If that doesn't work, then look into recompiling with the enable-sigchild option.

0 comments voice your opinion now!
oic8 oracle compile signal handle bequeathdetach recommendation


DevShed:
Managing Standalone Scripts in PHP
September 07, 2006 @ 16:19:52

DevShed continues their look at standalone PHP scripts (server-side scripting, not on the web) in part two, "Managing Standalone Scripts in PHP" excerpted from the book "Advanced PHP Programming" from George Schlossnagle.

Last week, we began our discussion of PHP standalone scripts. This week, we'll be talking about child processes, shared resources, signals, and writing daemons.

They jump right in, going first for a look at forking off child processes from the script using the pcntl functionality you'll need to build into PHP. Resource management is key to working with server scripts, and they show you how to close them out when you're through. Next up is a brief look at the types of signals that you can send to the child processes, and some good rules to follow for writing daemons in PHP.

0 comments voice your opinion now!
standalone script serverside daemon signal resources standalone script serverside daemon signal resources



Community Events





Don't see your event here?
Let us know!


code api interview bugfix configure language threedevsandamaybe laravel series developer library community introduction install application wordpress list podcast release unittest

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework