<?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, 24 May 2012 11:47:15 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DevShed: Sanitizing Input with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17250</guid>
      <link>http://www.phpdeveloper.org/news/17250</link>
      <description><![CDATA[<p>
DevShed.com has a new tutorial posted today looking at <a href="http://www.devshed.com/c/a/PHP/Sanitizing-Input-with-PHP/">how to sanitize data in your application</a>, specifically data coming from the user, when calling shell commands.
</p>
<blockquote>
Neglecting to sanitize user input that may subsequently be passed to system-level functions could allow attackers to do massive internal damage to your information store and operating system, deface or delete Web files, and otherwise gain unrestricted access to your server. And that's only the beginning.
</blockquote>
<p>
He starts with a "real world" example of non-filtered data that could pass through a "rm" command and erase your entire drive. He offers two solutions for preventing this sort of hack using the <a href="http://php.net/escapeshellcmd">escapeshellcmd</a> and <a href="http://php.net/escapeshellarg">escapeshellarg</a> functions.
</p>]]></description>
      <pubDate>Tue, 13 Dec 2011 11:49:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gareth Heyes' Blog: Non alphanumeric code in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16899</guid>
      <link>http://www.phpdeveloper.org/news/16899</link>
      <description><![CDATA[<p>
<i>Gareth Heyes</i> has tried out an interesting experiment - <a href="http://www.thespanner.co.uk/2011/09/22/non-alphanumeric-code-in-php/">running non-alphanumeric code in PHP</a> using only octal escapes.
</p>
<blockquote>
So a <a href="http://h.ackack.net/tiny-php-shell.html">small php shell</a> was tweeted around and it inspired me to investigate a way to execute non-alphanumeric code. First off I started with the idea of using octal escapes in PHP and constructing the escape so for example: 107 is "G" if I could construct the "107" and add the backslash to the beginning maybe I could construct "G".
</blockquote>
<p>
A snippet of example code is included showing his octal-based code for creating a "G" (6 lines of pluses, parentheses, equals and a few more characters). By doing some trickery with bitwise operators on strings, he was able to combine characters and make the string "GET". Pretty clever, even if it's not entirely practical.
</p>]]></description>
      <pubDate>Fri, 23 Sep 2011 10:05:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Casey's Blog: Make Your Life as a PHP Developer Twice as Easy With phpsh]]></title>
      <guid>http://www.phpdeveloper.org/news/16553</guid>
      <link>http://www.phpdeveloper.org/news/16553</link>
      <description><![CDATA[<p>
In his (Python) blog today <i>Casey</i> reminds the developer community <a href="http://pythonprojectwatch.blogspot.com/2011/07/make-your-life-as-php-developer-twice.html">about a handy tool</a> that the developers at Facebook have made available to make a PHP coder's life easier - <a href="http://phpsh.org/">phpsh</a>.
</p>
<blockquote>
The developers at Facebook have brought PHP developers a powerful REPL now ala-Python to round out a solid toolbox that PHP developers already have. The project is called phpsh and is written in Python.
</blockquote>
<p>
He includes the commands you'll need to get it pulled from github and working, providing you with an interactive shell right on your local machine (more powerful than the built-in PHP shell). You can also grab a <a href="http://github.com/facebook/phpsh/zipball/master">zip</a> or <a href="http://github.com/facebook/phpsh/tarball/master">gzipped</a> archive for download. For complete details on the tool and how to use it, see <a href="http://phpsh.org/">phpsh.org</a>. 
</p>]]></description>
      <pubDate>Tue, 05 Jul 2011 11:50:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jordi Boggiano's Blog: PHP Console in Your Browser]]></title>
      <guid>http://www.phpdeveloper.org/news/15183</guid>
      <link>http://www.phpdeveloper.org/news/15183</link>
      <description><![CDATA[<p>
<i>Jordi Boggiano</i> has <a href="http://seld.be/notes/php-console-in-your-browser">a new post today</a> looking at his PHP console script that works in your browser that sets up easily and works from your localhost web server - <a href="http://github.com/seldaek/php-console">php-console</a>.
</p>
<blockquote>
 Since I spend most of my days programming PHP I tend to need that a lot and a few years back I wrote a small script that would let me type php code in my browser and execute it. Nothing fancy, but quite useful. Over the years a few people got interest seeing me use it and asked for the sources, so instead of repackaging it every time, I thought I'd clean it up, polish a bit, add some features, and put it on github. 
</blockquote>
<p>
Setup is as simple as dropping the code somewhere in your local server's document root and offers a textarea for input and a expandable tree for the resulting output. It uses the <a href="http://krumo.sourceforge.net">Krumo</a> tool to create this modified output. You can see a <a href="http://seld.be/_misc/php-console.png">screenshot here</a>.
</p>]]></description>
      <pubDate>Fri, 24 Sep 2010 11:51:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: Now in trunk: Improved interactive shell]]></title>
      <guid>http://www.phpdeveloper.org/news/14578</guid>
      <link>http://www.phpdeveloper.org/news/14578</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has a new post to his blog today about a recent addition to the latest trunk branch for PHP - a <a href="http://schlueters.de/blog/archives/133-Now-in-trunk-Improved-interactive-shell.html">more interactive shell</a> that will be installed right along with the language.
</p>
<blockquote>
A few years ago I used another blog to write about "<a href="http://blog.mayflower.de/archives/44-More-PHP-power-on-the-command-line.html">More PHP power on the command line</a>" almost 5 years later the PHP interactive shell got a major update which went in PHP's trunk. 
</blockquote>
<p>
You can check out <a href="http://news.php.net/php.cvs/62675">the commit message</a> for more details on this new addition including paging ability and the ability to run PHP directly in the shell.
</p>]]></description>
      <pubDate>Mon, 31 May 2010 08:38:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Communty News: iphp, the Interactive PHP shell]]></title>
      <guid>http://www.phpdeveloper.org/news/13656</guid>
      <link>http://www.phpdeveloper.org/news/13656</link>
      <description><![CDATA[<p>
<i>Alan Pinstein</i> has put together <a href="http://github.com/apinstein/iphp">an interactive PHP shell</a> that gives you some interesting advantages over PHP's default shell feature.
</p>
<blockquote>
php is an interactive php shell that solves a number of painful problems with normal php shells: error handling, readline support, autocomplete, history, require support an autoload support.
</blockquote>
<p>
You can grab the latest version from <a href="http://github.com/apinstein/iphp">his github repository</a>. 
</p>]]></description>
      <pubDate>Thu, 10 Dec 2009 10:35:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Teknoid's Blog: A deeper look at working with CakePHP shells]]></title>
      <guid>http://www.phpdeveloper.org/news/12874</guid>
      <link>http://www.phpdeveloper.org/news/12874</link>
      <description><![CDATA[<p>
On his blog recently <i>teknoid</i> has posted <a href="http://teknoid.wordpress.com/2009/07/13/a-deeper-look-at-working-with-cakephp-shells/">a deeper look</a> at using shells for the CakePHP framework that allow you to quickly make your application usable from the command line.
</p>
<blockquote>
Why is that a good thing or what is it generally used for? Well, probably the #1 reason to write a shell is to allow certain aspects of your application to be executed by cron (behind the scenes), rather than through human intervention or web interface. [...] The other option is, of course, to be able to automate some mundane tasks... just take a look at the power of "bake".
</blockquote>
<p>
He's broken things up into a few different categories - a general look at what the shells are and how they can be used, some of the more handy shell methods included by default, how to load in models to get access to your data and, finally, how to call a method from one of your classes.
</p>]]></description>
      <pubDate>Wed, 15 Jul 2009 09:48:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Vid Luther's Blog: Using your Mac as a local web development environment.]]></title>
      <guid>http://www.phpdeveloper.org/news/11909</guid>
      <link>http://www.phpdeveloper.org/news/11909</link>
      <description><![CDATA[<p>
Having a development environment on a remote machine (maybe production, maybe test) is nice, but sometimes you just need the speed and simplicity that something a bit more local can give you. <i>Vid Luther</i> <a href="http://www.phpcult.com/blog/using-your-mac-as-a-local-web-development-environment/">talks about setting up</a> just such a local development environment on your Mac. (Sorry Windows guys - maybe check out <a href="http://www.wampserver.com/en/">WAMP</a>)
</p>
<blockquote>
This post is for the techies who know me, and are switching. Some are coming from Windows, some from Linux, some are designers who need to do some local development. So, I'll try to keep this post as simple as possible, and perhaps more like a tutorial, where you can "copy and paste" commands and files.
</blockquote>
<p>
He recommends a few pieces of software that you'll need - things like <a href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a> and <a href="http://dev.mysql.com/">MySQL</a> - and some other "nice to haves" like <a href="http://macromates.com/">TextMate</a>, <a href="http://www.open.collab.net/downloads/community/">Subversion</a> and <a href="http://www.expandrive.com/expandrive">Expandrive</a>. He shows how to set up the shell environment, create virtual hosts and add them into the /etc/hosts file so they'll resolve locally.
</p>]]></description>
      <pubDate>Mon, 09 Feb 2009 09:32:14 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin van Zonneveld's Blog: Create daemons in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11717</guid>
      <link>http://www.phpdeveloper.org/news/11717</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Kevin van Zonneveld</i> talks about <a href="http://kevin.vanzonneveld.net/techblog/article/create_daemons_in_php/">making daemons</a>, backend scripts that run independent of a web server.
</p>
<blockquote>
Everyone knows PHP can be used to create websites. But it can also be used to create desktop applications and commandline tools. And now with a class called System_Daemon, you can even create daemons using nothing but PHP. And did I mention it was easy?
</blockquote>
<p>
He starts with a definition ("a linux program that runs in the background") and why PHP makes a good language choice for creating them. His example uses the <a href="http://pear.php.net/package/System_Daemon">System_Daemon</a> PEAR class to do most of the heavy lifting. To use it, you only need to include it at the top of the script and make two calls to the setOption and start methods to have the rest of the code all set to run as a daemon.
</p>
<p>
The example code sets up a daemon complete with support for command-line arguments and the ability to be run from init.d on the local system.
</p>]]></description>
      <pubDate>Mon, 12 Jan 2009 08:47:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Don't Fear The Command Line: Using CakePHP Shells]]></title>
      <guid>http://www.phpdeveloper.org/news/10967</guid>
      <link>http://www.phpdeveloper.org/news/10967</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i> has a <a href="http://www.littlehart.net/atthekeyboard/2008/09/04/dont-fear-the-command-line-using-cakephp-shells/">new post</a> to his blog today focusing on using a bit of the CakePHP framework's functionality from the command line.
</p>
<blockquote>
I'm porting a spaghetti-PHP application over to using CakePHP I am moving their existing authorization system over to using Cake's Auth component. Of course, they are storing all their passwords in plaintext in the user account table, so I needed an easy way to convert all the existing passwords over to be encrypted using the same hash that Auth would use.
</blockquote>
<p>
With the help of the <a href="http://book.cakephp.org/view/110/Creating-Shells-Tasks">shells and tasks</a> that the framework makes availiable, he's able to make a simple 24 line class (EncryptPasswordShell) that extends the Shell object and loops through the data to push it back into the database in the correct password format.
</p>]]></description>
      <pubDate>Fri, 05 Sep 2008 07:53:01 -0500</pubDate>
    </item>
  </channel>
</rss>

