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

Three Devs & A Maybe:
Episode 109 - Processing Signals and Collecting Garbage with Joe Watkins
Oct 31, 2016 @ 19:34:57

The Three Devs and a Maybe Podcast, with hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann, has posted their latest episode with guest Joe Watkins. In this latest show Joe and the guys talk about handling signals and garbage collection in PHP.

In this weeks episode we have a long overdue catch-up with Joe Watkins. We start off discussion with progress on PHP 7.1 and work Joe has been doing to provide an interface to libui within PHP. We then move on to chat about a couple of interesting RFC’s that are currently under-discussion, followed by managing long-running PHP processes with Supervisor and Unix signaling. Finally, we highlight how Garbage collection works and how PHP implements the concept to help manage memory.

You can listen to this latest episode either through the in-page audio player or downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their feed to get updates on future shows as they're released.

tagged: threedevsandamaybe ep100 podcast joewatkins core developer garbagecollection signal

Link: http://threedevsandamaybe.com/processing-signals-and-collecting-garbage-with-joe-watkins/

Robert Basic's Blog:
Listening to Dbus signals with PHP
Dec 26, 2011 @ 17: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.

tagged: dbus signal listen tutorial extension

Link:

Chris Jones' Blog:
PHP OCI8 Signal Handling and --enable-sigchild
Mar 25, 2009 @ 15: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.

tagged: oic8 oracle compile signal handle bequeathdetach recommendation

Link:

DevShed:
Managing Standalone Scripts in PHP
Sep 07, 2006 @ 21: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.

tagged: standalone script serverside daemon signal resources standalone script serverside daemon signal resources

Link:

DevShed:
Managing Standalone Scripts in PHP
Sep 07, 2006 @ 21: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.

tagged: standalone script serverside daemon signal resources standalone script serverside daemon signal resources

Link:


Trending Topics: