<?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>Thu, 23 May 2013 14:35:32 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Smashing Magazine: Powerful Command Line Tools For Developers]]></title>
      <guid>http://www.phpdeveloper.org/news/18675</guid>
      <link>http://www.phpdeveloper.org/news/18675</link>
      <description><![CDATA[<p>
On the Smashing Magazine site today they've <a href="http://coding.smashingmagazine.com/2012/10/29/powerful-command-line-tools-developers/">posted a list of powerful CLI tools</a> that every developer should at least know about to help make their lives easier - six of them ranging from SSH tunnels to HTTP testing.
</p>
<blockquote>
Good tools are invaluable in figuring out where problems lie, and can also help to prevent problems from occurring in the first place, or just help you to be more efficient in general. Command line tools are particularly useful because they lend themselves well to automation and scripting, where they can be combined and reused in all sorts of different ways. Here we cover six particularly powerful and versatile tools which can help make your life a little bit easier.
</blockquote>
<p>The tools they mention are all things you'd install on a unix-based system:</p>
<ul>
<li>Curl
<li>Ngrep (network packet searching)
<li>Netcat (to work with network connections)
<li>Sshuttle (SSH tunneling)
<li>Siege (HTTP benchmarking)
<li>Mitmproxy (capturing proxy, both HTTP and HTTPS)
</ul>]]></description>
      <pubDate>Tue, 30 Oct 2012 10:18:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Jones: Using the PHP CLI Webserver to Identify and Test Memory Issues in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18361</guid>
      <link>http://www.phpdeveloper.org/news/18361</link>
      <description><![CDATA[<p>
<i>Chris Jones</i> has a new post today showing how you can <a href="https://blogs.oracle.com/opal/entry/using_the_php_cli_webserver">use PHP 5.4's built-in web server</a> to help test for memory issues in your application (and the language).
</p>
<blockquote>
Rasmus mentioned on IRC how he ran the [command line] tests: simply renaming the ".phpt" test files as ".php", and invoking them through the CLI webserver. The SKIPIF sections get executed, but that doesn't affect the desired outcome of testing multiple HTTP requests with different input scripts. [Here] are some quick shell scripts I put together to automate testing the OCI8 extension with valgrind.
</blockquote>
<p>
He uses the OCI8 extension as an example, showing how to set up these scripts to enable the execution of the tests, fire up the web server and execute Valgrind to help monitor the memory of the execution.
</p>]]></description>
      <pubDate>Wed, 15 Aug 2012 08:35:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Odafe Ojenikoh's Blog: Interactive PHP CLI Applications using Zend Form]]></title>
      <guid>http://www.phpdeveloper.org/news/17552</guid>
      <link>http://www.phpdeveloper.org/news/17552</link>
      <description><![CDATA[<p>
<i>Odafe Ojenikoh</i> has submitted a post he's written up showing how to <a href="http://blog.ojenikoh.com/2012/02/14/interactive-php-cli-applications-using-zend-form/">create a command line PHP application</a> with the help of the Zend Framework and it's Zend_Form elements.
</p>
<blockquote>
Over the weekend, I was toying with the idea of interactive cli applications using readline() and Zend Form for validating input. My motivation for using Zend Form or rather Zend Form elements was to exploit the power of features such as labels, validators, filters and the prospect of reusing forms within web application code.
</blockquote>
<p>
His example code defines a Filter for the form errors (returning them as a string) and a "Cli" class that handles the interaction with the command line. Next up is a class defining the form elements - a prompt for a color name and either of the words "thank" and "you". The Cli class transforms the form elements into prompts on the command line and lets you define validators to check their input.
</p>]]></description>
      <pubDate>Thu, 16 Feb 2012 11:09:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chance Garcia's Blog: MAMP PRO, PECL, SSH2, and OSX CLI (AKA acronym madness)]]></title>
      <guid>http://www.phpdeveloper.org/news/17107</guid>
      <link>http://www.phpdeveloper.org/news/17107</link>
      <description><![CDATA[<p>
<i>Chance Garcia</i> has a recent post to his blog showing how he <a href="http://phpprotip.com/2011/11/mamp-pro-pecl-ssh2-and-osx-cli-aka-acronym-madness/">fixed an issue with his MAMP install</a> involving development of a <a href="https://github.com/chancegarcia/CG/blob/github/Ssh.php">SSH wrapper</a> he developed and some testing out of PHPStorm and PHPUnit.
</p>
<blockquote>
One thing I can say is that, even though I use a convenient app like MAMP PRO to set up my local development environment, I'm glad my sysadmin-fu is up to snuff enough to fly without the conveniences because after this ordeal, I feel like I might as well have made my MAMP stack from scratch with all the hoops I jumped tonight.
</blockquote>
<p>
He shares a few of the things he discovered along the way like: the location of MAMP's "pecl" command, an error caused by a bad pear.conf file, doing custom compiles of PHP and libssh as a fallback and getting the extension to work in the CLI PHP version too.
</p>]]></description>
      <pubDate>Wed, 09 Nov 2011 11:37:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Building a small microframework with PHP (Part 2). Command line interface]]></title>
      <guid>http://www.phpdeveloper.org/news/16786</guid>
      <link>http://www.phpdeveloper.org/news/16786</link>
      <description><![CDATA[<p>
Continuing on with his <a href="http://phpdeveloper.org/news/16756">previous investigations</a> into microframworks and what it takes to create them, <i>Gonzalo Ayuso</i> has <a href="http://gonzalo123.wordpress.com/2011/08/29/building-a-small-microframework-with-php-part-2-command-line-interface/">posted his second part</a> of the series - a look at working on the command line.
</p>
<blockquote>
In my last post we spoke about building a small microframework with PHP. The main goal of this kind of framework was to be able to map urls to plain PHP classes and become those classes easily testeable with PHPUnit. Now we're going to take a step forward. [...] It's pretty straightforward to create a command line interface (CLI) for our microframework. 
</blockquote>
<p>
He shows how to use the <a href="http://php.net/getopt">getopt</a> function and the $GLOBALS superglobal to pull in arguments given to the command line script. He hooks this into the framework and makes it possible to define the controller and action to execute (with a few examples to show it in action). You can find this updated code on <a href="https://github.com/gonzalo123/microFramework">his github account</a>.
</p>]]></description>
      <pubDate>Mon, 29 Aug 2011 13:19:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: Introducing phix]]></title>
      <guid>http://www.phpdeveloper.org/news/16071</guid>
      <link>http://www.phpdeveloper.org/news/16071</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Stuart Herbert</i> has <a href="http://blog.stuartherbert.com/php/2011/03/21/introducing-phix/">introduced phix</a>, a packaging tools that can be used to manage and install different components in a framework-agnostic sort of way.
</p>
<blockquote>
<a href="http://github.com/Gradwell/phix">phix</a> is a small command-line tool for PHP applications. I created it to fix (pun intended) the problem of how to easily automate the tasks involved in creating and (especially) maintaining components. These tasks aren't built into phix; they are commands that ship with the phix distribution. You can create your own commands to run inside phix too, and it's easy to do so
</blockquote>
<p>
The <a href="http://github.com/Gradwell/phix">phix</a> tool (easily installed from PEAR) lets you either use built-in commands or custom ones to manage libraries with a few different kinds of commands - current status, initialize a library, upgrade a library and manage the full web application. As of the time of this post, the current version is <a href="http://github.com/Gradwell/phix">phix-0.10.4</a>.
</p>]]></description>
      <pubDate>Mon, 21 Mar 2011 08:24:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Simas Toleikis' Blog: Writing a PHP daemon application]]></title>
      <guid>http://www.phpdeveloper.org/news/15768</guid>
      <link>http://www.phpdeveloper.org/news/15768</link>
      <description><![CDATA[<p>
<i>Simas Toleikis</i> has a new post today looking at a method he's found for creating <a href="http://simas.posterous.com/writing-a-php-daemon-application">a simple daemon application</a> in PHP. He gives you the basic outline of how it works (with a bit of code included) but not a specific example.
</p>
<blockquote>
There is a special group of applications that require a different PHP script execution model. [...] All of [these special] applications need to be run in the background as daemons - something that PHP was never designed/supposed to be good at. The plain C language is a weapon of choice when it comes to writing a daemon implementation, but then again, if the application in question does not depend on high performance and concurrency - PHP can do the job quite well.
</blockquote>
<p>
He talks about using the command line interface to run the scripts, creating the while loop to keep execution going and creating the non-blocking socket so that the script can accept new client connections.  He also mentions using <a href="http://upstart.ubuntu.com/">upstart</a> to run the script in the background and the <a href="http://pecl.php.net/package/proctitle/">proctitle</a> PECL extension to give the process a custom name in the process list. He also touches on log files and forking/parallel processing.
</p>]]></description>
      <pubDate>Wed, 19 Jan 2011 11:51:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Running PHP and Zend Framework Scripts from the Command Line]]></title>
      <guid>http://www.phpdeveloper.org/news/15684</guid>
      <link>http://www.phpdeveloper.org/news/15684</link>
      <description><![CDATA[<p>
New on PHPBuilder.com today there's <a href="http://www.phpbuilder.com/columns/command-line-script/Jason_Gilmore01042011.php3">a tutorial from Jason Gilmore</a> about running Zend Framework-based applications from the command line in a more hard-coded way than using Zend_Tool.
</p>
<blockquote>
I regularly use an alternative application of PHP and I'm quite surprised that this capability remains relatively unknown. I'm referring to the ability to run PHP scripts from the command line using its command line interpreter (CLI). Even though it's been possible since the PHP 4.3.0 release, you may be completely unaware of this CLI usage unless you employ great tools such as PHPDoc, Phing, or PHPUnit. Running PHP scripts with CLI allows you to leverage your PHP language skills whenever you need to run scripts from the shell.
</blockquote>
<p>
He talks about what the CLI functionality of PHP is and what it has to offer the developer. He then creates a few sample scripts so you can get a feel for how to write and run simple PHP CLI applications. Building on these examples, he <a href="http://www.phpbuilder.com/columns/command-line-script/Jason_Gilmore01042011.php3?page=2">creates a Zend Framework-based script</a> that loads in the bootstrap, grabs configuration values and makes a connection to the Amazon Web Services.
</p>]]></description>
      <pubDate>Wed, 05 Jan 2011 09:29:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: PHP command line progress bar]]></title>
      <guid>http://www.phpdeveloper.org/news/14168</guid>
      <link>http://www.phpdeveloper.org/news/14168</link>
      <description><![CDATA[<p>
<i>Brian Moon</i> has a quick post that links to a but of code that gives you a <a href="http://brian.moonspot.net/php-progress-bar">progress bar for the command line</a> that's flexible enough to be used in an number of situations.
</p>
<blockquote>
Was just looking through some code and came across this function I wrote some time ago. If you do a lot of your processing scripts in PHP like we do, you probably need to know what is going on sometimes. So, I made a progress bar for use on the cli. I thought I would share it.
</blockquote>
<p>
You can see a demo of it <a href="http://www.screencast.com/users/brianlmoon/folders/Jing/media/822d9970-a6a3-4071-bdc6-1303cce9800a">here</a> (screencast) or just <a href="http://brian.moonspot.net/status_bar.php.txt">download the code</a>. Comments on the post also point out the <a href="http://pear.php.net/package/Console_Progressbar">PEAR Console_Progressbar</a> package and the <a href="http://ezcomponents.org/docs/api/latest/introduction_ConsoleTools.html#progress-indication">ez Components class</a> for creating a more advanced progress bar.
</p>]]></description>
      <pubDate>Thu, 11 Mar 2010 10:23:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: Debugging on the Command Line with xdebug]]></title>
      <guid>http://www.phpdeveloper.org/news/13769</guid>
      <link>http://www.phpdeveloper.org/news/13769</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> has <a href="http://daveyshafik.com/archives/734-debugging-on-the-command-line-with-xdebug.html">a quick tip</a> for anyone trying to use Xdebug from the command line and finding themselves having issues.
</p>
<blockquote>
Thanks to some help from <a href="http://derickrethans.nl/">Derick</a> and my co-worker <a href="http://twitter.com/magical_trevor">Trevor</a>, I now have a simple bash script that will let me and my team easily debug CLI scripts on our development server.
</blockquote>
<p>
The script is two lines (really just one) that uses a combination of environment variables, PHP's command line binary and a few other standard unix commands to parse the output of the request. The script can be made executable and dropped into a place in your path to make it as simple as running "xdebug file.php" on the file.
</p>]]></description>
      <pubDate>Mon, 04 Jan 2010 09:33:12 -0600</pubDate>
    </item>
  </channel>
</rss>
