<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 12 Feb 2012 21:45:19 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Pavel Shevaev's Blog: Make php-fpm execute arbitrary PHP scripts via socket]]></title>
      <guid>http://www.phpdeveloper.org/news/17045</guid>
      <link>http://www.phpdeveloper.org/news/17045</link>
      <description><![CDATA[<p>
<i>Pavel Shevaev</i> has a quick new post to his blog showing how to get PHP-FPM to <a href="http://efiquest.org/2011-10-22/55/">execute PHP scripts</a> via a socket request.
</p>
<blockquote>
We are using <a href="http://pecl.php.net/APC">APC cache</a> very heavily in our projects and during project deployment the cache must be flushed and warmed up. A common solution to warmup the APC cache is to fetch some special page via HTTP which does the job. The problem with this approach is that it's not reliable enough when PHP is served via several fastcgi back-ends.
</blockquote>
<p>
To solve the problem, he uses a <a href="https://github.com/pachanga/phpfpm">PHP-FPM module</a> to work with the FastCGI socket and execute any file (as permissions allow, of course). In his case, he uses it to "warm up" his APC cache for the user. A code snippet is provided as an example.
</p>
]]></description>
      <pubDate>Wed, 26 Oct 2011 11:19:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tibo Beijen's Blog: Fixing mysqldump on Zend Server CE on OS X]]></title>
      <guid>http://www.phpdeveloper.org/news/15978</guid>
      <link>http://www.phpdeveloper.org/news/15978</link>
      <description><![CDATA[<p>
<i>Tibo Beijen</i> has a new post today showing his method for <a href="http://www.tibobeijen.nl/blog/2011/03/01/fixing-mysqldump-on-zend-server-ce-on-os-x/">fixing mysqldump on Zend Server CE</a> running on an OS X platform. The default install throws a socket error when you try to dump a database using the command.
</p>
<blockquote>
Inspecting the mysql configuration contained in /usr/local/zend/mysql/data/my.cnf confirmed that the section [client] showed the socket as returned by executing SHOW VARIABLES; from the mysql client: /usr/local/zend/mysql/tmp/mysql.sock Although it is possible to specify the socket by using mysqldump's --socket switch, that doesn't really seem a 'solution'.
</blockquote>
<p>
As a real solution to the problem was to copy over the my.cnf file from the custom location Zend Server has it in to the default "/etc/my.cnf" with settings pointing to the correct MySQL socket.
</p>]]></description>
      <pubDate>Tue, 01 Mar 2011 11:50:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: PHP Scripts for Interacting with Networks]]></title>
      <guid>http://www.phpdeveloper.org/news/15585</guid>
      <link>http://www.phpdeveloper.org/news/15585</link>
      <description><![CDATA[<p>
On PHPBuilder.com there's <a href="http://www.phpbuilder.com/columns/php-networking/Leidago_Noabeb12142010.php3">a new tutorial</a> showing you some of the PHP functions that you can use to interact with the network surrounding (and even vaguely related to) your application.
</p>
<blockquote>
PHP has a great many tools for interacting with a network and also with the Internet. In this article, I examine some of those tools and functions to show how exactly you can use them to make your scripts more useful in a network environment. Click here to download the accompanying source code.
</blockquote>
<p>
They show how to use <a href="http://php.net/fopen">fopen</a> to access remote sites, <a href="http://php.net/gethostbyname">gethostbyname</a> and <a href="http://php.net/gethostbyaddr">gethostbyaddr</a> for DNS resolution, <a href="http://php.net/getprotobynumber">getprotobynumber</a> to check the port number for a TCP/IP type and quite a few more. This also includes a brief look at the PEAR Net_Whois package. You can <a href="http://www.phpbuilder.com/columns/php-networking/NetworkingSourceCode.zip">download the examples</a> if you'd like to just jump into the code.
</p>]]></description>
      <pubDate>Wed, 15 Dec 2010 13:49:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: Creating a traceroute program in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15530</guid>
      <link>http://www.phpdeveloper.org/news/15530</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has a new post to his blog looking at taking a common unix tool - traceroute - and seeing if he could <a href="http://www.adayinthelifeof.nl/2010/07/30/creating-a-traceroute-program-in-php/">translate it into PHP</a> where it could be called directly without the need for something like <a href="http://php.net/exec">exec</a>.
</p>
<blockquote>
Today i was reading upon <a href="http://blog.ksplice.com/2010/07/learning-by-doing-writing-your-own-traceroute-in-8-easy-steps/">this wonderful article</a> about writing a trace-route program in Python in 40 lines. Even though trace-route is one of the many tools i use on day to day basis, i never really got into writing a version myself (something I like to do just to gain knowledge how things works). So when I was reading this post, i thought, Python is nice, but is it possible to do it in PHP as well? The answer to that: yes and no..
</blockquote>
<p>
His post introduces you to "traceroute" (including a bit on how it works) in case you're either not a unix user or haven't gone much past some of the basics of the operating system type. One issues he butted up against was problems with the socket extension in PHP and inconsistencies with the underlying connection types. Another is the limitation of the tool only working as the root superuser. He includes the actual code and some sample output if you'd like to try it for yourself.
</p>]]></description>
      <pubDate>Thu, 02 Dec 2010 13:09:07 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[CatsWhoCode.com: How to easily monitor your web server using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/13986</guid>
      <link>http://www.phpdeveloper.org/news/13986</link>
      <description><![CDATA[<p>
In a new post to the CatsWhoCode.com blog <i>Jean-Babtiste Jung</i> walks you through the creation of a <a href="http://www.catswhocode.com/blog/how-to-easily-monitor-your-web-server-using-php">simple monitoring script</a> written using just PHP that can tell you if your web site is up and responsive.
</p>
<blockquote>
In order to make sure that your website is always available to the public, you have to monitor it. In this tutorial, I'll show you how you can easily create a monitoring script that will check your website availability and send an email or sms alert to you if it isn't.
</blockquote>
<p>
They have a snippet of code (about 15 lines long) with a function you can call to check a remote host's connection and check the returned data for a certain string. This can not only ensure that your site is responsive but also that it's not responding incorrectly. You could even use this to hit a certain monitoring page of your site to check for certain things (like database connection problems).
</p>]]></description>
      <pubDate>Mon, 08 Feb 2010 13:48:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Weiske's Blog: PHP Testfest Berlin 2009]]></title>
      <guid>http://www.phpdeveloper.org/news/12499</guid>
      <link>http://www.phpdeveloper.org/news/12499</link>
      <description><![CDATA[<p>
<i>Christian Weiske</i> has <a href="http://cweiske.de/tagebuch/PHP%20Testfest%20Berlin%202009.htm">posted about his experience</a> at this year's TestFest in Belin (as hosted by the Berlin PHP User Group).
</p>
<blockquote>
I spent the last weekend (may 09/10) on the PHP Testfest Berlin, organized by <a href="http://pear.php.net/user/till">Till</a> for the Berlin PHP Usergroup. Coming from Leipzig, I don't really know who of the other 8 people were from the user group and who not.
</blockquote>
<p>
He mentions issues the group faced (OS X being difficult, PHP from CVS not compiling), the intro to testing and their first area of choice - gettext (which they got up to 98.8% coverage!). The second and third efforts were some work done on the intl and sockets extensions.
</p>]]></description>
      <pubDate>Tue, 12 May 2009 12:05:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DeveloperTutorials.com: Port Scanning and Service Status Checking in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12297</guid>
      <link>http://www.phpdeveloper.org/news/12297</link>
      <description><![CDATA[<p>
On the DeveloperTutorials.com site today there's <a href="http://www.developertutorials.com/tutorials/php/port-scanning-and-service-status-checking-in-php-8-06-06/page1.html">a new tutorial</a> showing the creation of a port scanner with PHP - a tool that, given some of the familiar ports that services (like web or email servers) run on, can check to see if they're responding.
</p>
<blockquote>
While building web applications, it's often important to keep an eye on the other services running on your server. Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.
</blockquote>
<p>
Their example makes a socket connection to the remote port to see if there's a valid hookup. The wrap this inside a loop for ports 1 through 1000 to see what ports are open and responding on your local machine (doing this on a remote machine is just asking for trouble).
</p>
<p>
Their full example defines some of the common ports in an array and loops to check on their status. It sets out a base you can build on top of with things like their suggestions - logging scan results, repoting downtime and running a service-specific task.
</p>]]></description>
      <pubDate>Wed, 08 Apr 2009 08:49:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: PHP Networking ]]></title>
      <guid>http://www.phpdeveloper.org/news/10991</guid>
      <link>http://www.phpdeveloper.org/news/10991</link>
      <description><![CDATA[<p>
In a <a href="http://www.devshed.com/c/a/PHP/PHP-Networking/">new tutorial</a> from DevShed today, they take a look at some of the "networking" functions that PHP has to offer - basically anything that can make a network connection.
</p>
<blockquote>
PHP has a great many tools for interacting with a network and also with the Internet. In this article we will look at some of those tools and functions to see how we can use them to make our scripts more useful in a network environment.
</blockquote>
<p>
They look at the <a href="http://www.php.net/fopen">fopen</a>, <a href="http://www.php.net/gethostbyname">gethostbyname</a>, <a href="http://www.php.net/gethostbynamel">gethostbynamel</a>, <a href="http://php.net/getservbyport">getservbyport</a> and the <a href="http://pear.php.net/package/Net_Whois">Net_Whois</a> PEAR package (among others).
</p>]]></description>
      <pubDate>Tue, 09 Sep 2008 12:09:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ThinkPHP Blog: Comet in conjunction with a PHP socket server - server-client communication]]></title>
      <guid>http://www.phpdeveloper.org/news/10941</guid>
      <link>http://www.phpdeveloper.org/news/10941</link>
      <description><![CDATA[<p>
In a <a href="http://blog.thinkphp.de/archives/355-Comet-in-conjunction-with-a-PHP-socket-server-Yet-another-way-of-server-client-communication.html">new post</a> to the ThinkPHP blog today there's a look at combining Comet with PHP to make a simple method for the client to talk back to the server outside the usual methods.
</p>
<blockquote>
If a couple of users have opened the application there are already some hundred or thousand requests per second. The outcome of this is a big load for your server and a highly increased traffic - your server will in a senseless way be overloaded. In conclusion, our problem is the enormous amount of polling without knowing whether the server really wants to send a new push. Let's turn the initial situation around. And we get the solution to our problem: Comet.
</blockquote>
<p>
With Coment, the model changes and the request is "cached" on the server-side automatically in a single Comet instance. Coordinate this with another recommendation of theirs, a PHP socket server, and you can do some pretty interesting things.
</p>]]></description>
      <pubDate>Tue, 02 Sep 2008 08:41:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[AnyExamples.com: PHP Whois Client Function]]></title>
      <guid>http://www.phpdeveloper.org/news/8683</guid>
      <link>http://www.phpdeveloper.org/news/8683</link>
      <description><![CDATA[<p>
On the AnyExamples.com website, there's a <a href="http://www.anyexample.com/programming/php/php_whois_client_function.xml">new little how to</a> on making a whois client in PHP (without just using an exec or similar call to the filesystem).
</p>
<blockquote>
This article contains PHP implementation of whois client (as a function ae_whois), which may be used to request domain information from specified whois servers.
</blockquote>
<p>
Their <a href="http://www.anyexample.com/programming/php/php_whois_client_function.xml">method</a> uses the socket functionality (fsockopen, fwrite, fclose) to make a connection to the remote server for the specified domain's information.
</p>]]></description>
      <pubDate>Wed, 19 Sep 2007 08:43:00 -0500</pubDate>
    </item>
  </channel>
</rss>

