<?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>Mon, 21 May 2012 08:40:11 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Johnstone's Blog: Vagrant, Automating PHP/MySQL Installation with bash/slack]]></title>
      <guid>http://www.phpdeveloper.org/news/17241</guid>
      <link>http://www.phpdeveloper.org/news/17241</link>
      <description><![CDATA[<p>
<i>Andrew Johnstone</i> has a new post to his blog with a look at <a href="http://ajohnstone.com/achives/vagrant-automating-php-installation-with-bashslack-for-continuous-deployment/">using Vagrant for continuous deployment</a> of a PHP-based application.
</p>
<blockquote>
<a href="http://vagrantup.com/">Vagrant</a> is simply a wrapper around Virtualbox headless that allows for provisioning virtual machines with support for <a href="http://projects.puppetlabs.com/projects/puppet">puppet</a>, <a href="http://wiki.opscode.com/display/chef/Chef+Solo">chef-solo</a>, <a href="http://wiki.opscode.com/display/chef/Home">chef</a>, and <a href="http://tldp.org/LDP/abs/html/">bash</a>. This allows you to automate the deployment and sandboxing of development sites. Additional base box images can be found at <a href="http://www.vagrantbox.es/">vagrantbox.es</a>.
</blockquote>
<p>
He walks you through the full process of setting up a first deployment - getting Vagrant installed, updating the config for a squeeze64.box image, configuring a virtualhost on the Apache web server and setting up a "preinstall" script to configure things like MySQL and install a long list of packages (via apt-get). 
</p>]]></description>
      <pubDate>Mon, 12 Dec 2011 08:58:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Multiple PHP versions set-up]]></title>
      <guid>http://www.phpdeveloper.org/news/17092</guid>
      <link>http://www.phpdeveloper.org/news/17092</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post today looking at a method for <a href="http://derickrethans.nl/multiple-php-version-setup.html">setting up multiple PHP versions</a> on the same machine and switch between them with a little help from some simple bash scripts.
</p>
<blockquote>
For many of my projects (both <a href="http://derickrethans.nl/projects.html">hobby</a> and <a href="http://derickrethans.nl/who.html#derickrethansltd">commercial</a>) I need to support many different PHP configurations. Not only just different PHP versions, but also debug builds, ZTS builds and 32-bit builds. In order to be able to test and build extensions against all those different PHP configurations I have adopted a simple method that I'm sharing with you here.
</blockquote>
<p>
Using <a href="http://derickrethans.nl/files/php-build.sh.txt">this script</a> he can tell his system to pull the latest version of any release from SVN and try to compile it. The trick is putting each of them into a different directory under /usr/local. He uses another small shell function (with a function called "pe()") that sets up the pathing to the right release, complete with its own locations for PEAR/PECL and a php.ini.
</p>]]></description>
      <pubDate>Mon, 07 Nov 2011 09:14:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Converting DocBook4 to DocBook5]]></title>
      <guid>http://www.phpdeveloper.org/news/16611</guid>
      <link>http://www.phpdeveloper.org/news/16611</link>
      <description><![CDATA[<p>
In <a href="http://weierophinney.net/matthew/archives/264-Converting-DocBook4-to-DocBook5.html">this new post</a> to his blog <i>Matthew Weier O'Phinney</i> looks at the steps he took to convert over the documentation for the Zend Framework 2 from the DocBook 4 formatting over to DocBook 5. Included in the post is some of the (PHP and bash) code he used to make the switch.
</p>
<blockquote>
Within the <a href="https://github.com/zendframework/zf2">Zend Framework 2 repository</a>, I recently performed a conversion from <A href="http://docbook.org/">DocBook</a> 4 to 5. [...] Interestingly, for DocBook5 being available in beta since 2005 and an official standard since 2009, there is very little material on migrating from DocBook 4 to 5.
</blockquote>
<p>
Right from the start he came across a few problems with the included conversion process that're a part of the "db4-update.xsl" definitions. 
 He has a list of eight steps he had to perform on the current DocBook 4 formatted documentation to make the conversion work smoothly including:
</p>
<ul>
<li>Identify files containing entity declarations, and skip them.
<li>Run the XML file through the db4-upgrade.xsl stylesheet and restore XML entities from the previously placed markers
<li>Fix programlisting elements (replaces entities with original text and wraps in CDATA).
</ul>
<p>
He details these steps in a few different sections talking about handling the entities, creating some helper scripts and how to put the two code parts together in a single bash script that can be run on the entire documentation set. If you're just looking for the code, you can find it <a href="https://github.com/weierophinney/docbook5-migration">on his github account</a>.
</p>]]></description>
      <pubDate>Wed, 20 Jul 2011 09:55:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Conor Mac Aoidh's Blog: OS X: Audio Alerts for PHP Errors]]></title>
      <guid>http://www.phpdeveloper.org/news/14689</guid>
      <link>http://www.phpdeveloper.org/news/14689</link>
      <description><![CDATA[<p>
In <a href="http://blog.macaoidh.name/2010/06/22/os-x-audio-alerts-for-php-errors/">a new post</a> to his blog today <i>Conor Mac Aoidh</i> talks about a way he's developed to get audio alerts whenever PHP errors pop up in your scripts using the <a href="http://sourceforge.net/projects/swatch/">swatch</a> tool.
</p>
<blockquote>
Kae <a href="http://verens.com/2010/06/22/audio-alerts-for-php-errors">posted</a> today about tackling this problem under Linux, but I've found that it's quite a different task under OS X. 
</blockquote>
<p>
It also uses some additional Perl modules (like Date::Calc and Date::Manip) to set up swatch. From there it's just a matter of adding a few lines to a configuration file to watch for the errors and sound the "bell". A few bash scripts will need to be added to correctly start the service too.
</p>]]></description>
      <pubDate>Wed, 23 Jun 2010 09:14:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrew Johnstone's Blog: Lock Files in PHP & Bash]]></title>
      <guid>http://www.phpdeveloper.org/news/13781</guid>
      <link>http://www.phpdeveloper.org/news/13781</link>
      <description><![CDATA[<p>
<i>Andrew Johnstone</i>, inspired by <a href="http://abhinavsingh.com/blog/2009/12/how-to-use-locks-in-php-cron-jobs-to-avoid-cron-overlaps/">a previous post</a> on file locking to avoid cron job overlaps, as posted <a href="http://ajohnstone.com/archives/lock-files-in-php-bash/">his own method</a> and give a few more examples of how it can be done.
</p>
<blockquote>
In order for a lock to work correctly it must handle, Atomicity / Race Conditions, and Signaling. I use the following bash script to create locks for crontabs and ensure single execution of scripts.
</blockquote>
<p>
His bash script looks at the processes currently running and checks to be sure there's not already one there. If not, it takes the script given and executes an instance. If the process has finished running but the lock file is still there, it removes it and moves on to the execute. He includes a few examples of how to use it and the code for a PHP class that makes it easy to check if something's running, locked or what the current signal/status of the process is.
</p>]]></description>
      <pubDate>Tue, 05 Jan 2010 12:40:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Interactive CLI password prompt in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12440</guid>
      <link>http://www.phpdeveloper.org/news/12440</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog today <i>Troels Knak-Nielsen</i> has <a href="http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/">a quick tip</a> for those looking for a way to have their command-line PHP scripts be more interactive.
</p>
<blockquote>
Just a quick tip, since I spent a good hour figuring this out recently. PHP has no native way of doing an interactive password prompt, when running as CLI. You can however use bash for the task.
</blockquote>
<p>
His <a href="http://www.sitepoint.com/blogs/2009/05/01/interactive-cli-password-prompt-in-php/">method</a> (for both Windows and Unix systems) uses <a href="http://php.net/shell_exec">shell_exec</a> command to run a VB Script/bash command that handles the password prompt for the PHP script. The result is then passed back into a variable and returned back to the calling application.
</p>]]></description>
      <pubDate>Fri, 01 May 2009 09:34:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevX: Integrating Bash with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11947</guid>
      <link>http://www.phpdeveloper.org/news/11947</link>
      <description><![CDATA[<p>
<a href="http://www.devx.com/opensource/Article/40785">This DevX tutorial</a> shows you how to use a unix-based shell in PHP in three different environments (using three different tools) on Windows.
</p>
<blockquote>
This article discusses how to install and configure three Bash distributions for Windows: the GNU BASH shell for Windows, the Win-Bash Windows port, and the Cygwin tool. It also demonstrates how to execute Bash scripts using PHP, how to send different types of arguments to a Bash script, how to use Bash functions from PHP, and how to save results to a text file.
</blockquote>
<p>
They start with the Windows installs using the <a href="http://www.steve.org.uk/Software/bash/bash-203.zip">GNU Bash shell for Windows</a>, <a href="http://www.cygwin.com/">Cygwin</a> and <a href="http://win-bash.sourceforge.net/">Win-Bash</a> with a healthy dose of code thrown in between. Examples include both the bash scripting and PHP script sides to push the output of the commands into local text files.
</p>]]></description>
      <pubDate>Fri, 13 Feb 2009 11:14:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Amir Saied's Blog: PEAR bash completion]]></title>
      <guid>http://www.phpdeveloper.org/news/10696</guid>
      <link>http://www.phpdeveloper.org/news/10696</link>
      <description><![CDATA[<p>
<i>Amir Saied</i> <a href="http://gluegadget.com/blog/index.php?/archives/27-PEAR-bash-completion.html">recently posted</a> a handy little tool for the PEAR users out there - a bash script that handles tab completion for you.
</p>
<blockquote>
Lately I've been playing alot with the PEAR CLI.  The one annoying thing I noticed the most was its lack of tab completion that I'm used to from the shell.  It turns out that this feature is very easy to add, in the bash at least.
</blockquote>
<p>
It will finish off the PEAR commands for you and expand out the PEAR package names and discovered channels when it finds a match. You can <a href="http://gluegadget.com/misc/pear">download the package here</a>.
</p>]]></description>
      <pubDate>Mon, 28 Jul 2008 12:08:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: PHP Manual CLI style 2.0]]></title>
      <guid>http://www.phpdeveloper.org/news/9142</guid>
      <link>http://www.phpdeveloper.org/news/9142</link>
      <description><![CDATA[<p>
Sometimes, you just can't get to a web browser to look up something from the PHP manual (or might not want to). Another option is the command line and in <a href="http://www.sitepoint.com/blogs/2007/11/28/php-manual-cli-style-20/">this new post</a> to the SitePoint PHP blog, <i>Troels Knak-Nielsen</i> shows you a method for getting the entire manual entry right at your prompt neatly formatted.
</p>
<blockquote>
One thing, I missed with either of the two [other solutions mentioned], was the ability to see the entire manual entry. It's quite often, that the manual actually holds useful information (Who'd known that!), so I find myself using <a href="http://www.php.net/">www.php.net</a> a lot. Or I did, until I decided to do something about it. Now, shell-scripting isn't what I spent most of my time on, so it's not with out a bit of pride, that I present to you phpm two-oh.
</blockquote>
<p>
Most of the rest of <a href="http://www.sitepoint.com/blogs/2007/11/28/php-manual-cli-style-20/">the post</a> is his bash script ready top cut and paste as well as some simple instructions on getting it working. (An emacs bonus is also included - a method for binding the script to a key to act on the current word.)
</p>]]></description>
      <pubDate>Thu, 29 Nov 2007 09:35:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: MS vs PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/4863</guid>
      <link>http://www.phpdeveloper.org/news/4863</link>
      <description><![CDATA[From <i>Ilia Alshanetsky</i>'s blog today, there's <a href="http://ilia.ws/archives/106-MS-vs-PHP.html">a mention</a> of a cartoon found on Microsoft's site mentioning PHP.
<p>
<quote>
<i>
You know you're moving up in the world when Microsoft feels that it's necessary to make cartoon disparaging your products, in favor of their own wares. Pierre, one of the PHP developers, has found <a href="http://www.microsoft.com/france/msdn/aspnet/coach.mspx">this gem</a> on the French segment of the Microsoft site. I guess it means that PHP is making enough in-roads into the Enterprise market, that big fish like MS feel it necessary to spread some FUD as a stop-gap measure.
</i>
</quote>
<p>
Check out <a href="http://www.flickr.com/photos/12538148@N00/100864754/">this version</a> for an english translation...]]></description>
      <pubDate>Mon, 20 Feb 2006 06:57:53 -0600</pubDate>
    </item>
  </channel>
</rss>

