<?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>Wed, 19 Jun 2013 05:07:07 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Maclean: Why one-line installers are a bad idea]]></title>
      <guid>http://www.phpdeveloper.org/news/18505</guid>
      <link>http://www.phpdeveloper.org/news/18505</link>
      <description><![CDATA[<p>
There's a feature that's usage has been showing up more and more in software projects (both open source and not) that allows you to install their system with a single line command, usually involving curl and maybe piping it to a shell. In <a href="http://mgdm.net/weblog/why-one-line-installers-are-bad/">this recent post</a> <i>Michael Maclean</i> takes a look at this trend and some of the possible pitfalls of the approach.
</p>
<blockquote>
There has been a trend in the last while for various bits of useful software to have a one-line shell command recommended as the installation method. The usual form of this is to pipe something like curl or wget to some interpreter, be it bash, php, ruby, or some such. [...] This [type of] command takes the output of curl and pipes it straight to bash. I have several issues with this.
</blockquote>
<p>
His three main points center around the fact that you cannot inspect the code before executing it with this method, that you can't verify the source of the code and that it teaches users bad habits of trusting in "magic commands" like these.
</p>]]></description>
      <pubDate>Fri, 21 Sep 2012 11:35:29 -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[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>
  </channel>
</rss>
