<?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>Sat, 18 May 2013 19:55:43 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Automatic Testing for TDD with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18400</guid>
      <link>http://www.phpdeveloper.org/news/18400</link>
      <description><![CDATA[<p>
If you practice the TDD (test-driven development) methodology in your work, you know that sometimes switching back and forth between a terminal and your IDE can be distracting. In <a href="http://net.tutsplus.com/tutorials/php/automatic-testing-for-tdd-with-php/">this new tutorial</a> from NetTuts.com, they show you how to streamline things a bit with a simple Ruby script.
</p>
<blockquote>
Traditional test-driven development can, at times, be cumbersome. You have to stop writing code in order to run your tests. Luckily, there are solutions, which provide the ability to automatically run your tests as you code. In this tutorial, you will learn how to use a Ruby gem, called watchr, to monitor your code and automatically run the appropriate tests whenever you save your work.
</blockquote>
<p>
The IDE doesn't matter in this case because the "watchr" tool keeps an eye on when things change in the watched directory and automatically fires off a script when it sees an update. They include the few short lines of Ruby to make it all happen and even have the "notify-send" command built in to give you a popup about the pass/fail status.
</p>]]></description>
      <pubDate>Fri, 24 Aug 2012 09:09:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[P&aacute;draic Brady's Blog: Automatic Output Escaping In PHP & The Real Future Of Preventing XSS]]></title>
      <guid>http://www.phpdeveloper.org/news/18107</guid>
      <link>http://www.phpdeveloper.org/news/18107</link>
      <description><![CDATA[<p>
<i>P&aacute;draic Brady</i> has a new post to his blog about the <a href="http://blog.astrumfutura.com/2012/06/automatic-output-escaping-in-php-and-the-real-future-of-preventing-cross-site-scripting-xss/">state of output escaping in PHP</a> and the steps that need to be taken to help prevent and protect applications from the real threat of cross-site scripting.
</p>
<blockquote>
Automatic escaping has a certain appeal given its goal of removing the need to type escape() all over your templates. Funny thing, though, is that this is basically its one and only advantage. The second claimed goal is to remove a factor of human error (i.e. forgetting to type escape() somewhere), however, this hasn't posed an issue for me in the past where simple analysis of templates can quickly locate such omissions. And no, using automatic escaping does not remove the need to analyse templates for security issues - that's still needed regardless. 
</blockquote>
<p>
He goes on to define what "automatic escaping" is and isn't and how it relates to the context of the information (the same data may not always be filtered the same way in every place). He talks about scope-limited escaping, context-aware escaping and an idea that could help make life easier - a <a href="http://www.w3.org/TR/CSP/">content security policy</a> defining how the client should behave when interpreting HTML.
</p>]]></description>
      <pubDate>Mon, 18 Jun 2012 11:58:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Design Aeon: Check Dead Links From Database Using PHP CURL]]></title>
      <guid>http://www.phpdeveloper.org/news/18105</guid>
      <link>http://www.phpdeveloper.org/news/18105</link>
      <description><![CDATA[<p>
On DesignAeon.com there's a recent tutorial posted showing you how to extract URLs from your database and <a href="http://www.designaeon.com/check-dead-links-from-database-using-php-curl/">determine which ones are "dead"</a> automatically with the help of <a href="http://php.net/curl">cURL</a>.
</p>
<blockquote>
Checking Deadlinks From the database manually is a Headache ,So why not use a script which return the http status of the particular link and tell us if the link is dead or not.So how do we check the dead links from the database ? How do we programatically  check whether the link is dead or not ? To check broken or dead links from Database we will use curl .
</blockquote>
<p>
Included in the post is a <a href="http://www.designaeon.com/check-dead-links-from-database-using-php-curl/">sample script</a> that extracts the URLs from a field in the database (you'd need some extra smarts if you're pulling it from content) and running it though a "checklink" function. If the call to <a href="http://php.net/curl_getinfo">curl_getinfo</a> returns false, the link is marked dead.
</p>]]></description>
      <pubDate>Mon, 18 Jun 2012 09:45:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Automatic CSS3 Prefixer and Compressor]]></title>
      <guid>http://www.phpdeveloper.org/news/17700</guid>
      <link>http://www.phpdeveloper.org/news/17700</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how to use a little PHP magic to <a href="http://phpmaster.com/automatic-css3-prefixer-and-compressor/">compress your CSS</a> automatically.
</p>
<blockquote>
There are many ways to compress CSS files or automatically generate browser-specific CSS3 prefixes, but usually extra tools are used which is very annoying. I'd like to show you how such tasks can be done using only PHP. 
</blockquote>
<p>
Complete code for this small script is included in <a href="http://phpmaster.com/automatic-css3-prefixer-and-compressor/">the article</a>. It uses some regular expressions to parse the CSS and does some replacement and removal of things from the CSS content to slim it down and format it all as one line. There are <a href="http://cdn.phpmaster.com/files/2012/03/css-regex1.png">some</a> <a href="http://cdn.phpmaster.com/files/2012/03/css-regex2.png">images</a> <a href="http://cdn.phpmaster.com/files/2012/03/css-regex3.png">illustrating</a> the <a href="http://cdn.phpmaster.com/files/2012/03/css-regex4.png">process</a> also included.
</p>]]></description>
      <pubDate>Tue, 20 Mar 2012 12:38:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: phpDocumentor Merges with DocBlox for phpDocumentor 2!]]></title>
      <guid>http://www.phpdeveloper.org/news/17686</guid>
      <link>http://www.phpdeveloper.org/news/17686</link>
      <description><![CDATA[<p>
As is mentioned in <a href="http://www.docblox-project.org/2012/03/docblox-is-unmasked-it-is-really-phpdocumentor-2/">this new post</a> to the DocBlox blog, there's been a major development between it and the phpDocumentor documentation generation tool - phpDocumentor 2 will be released soon, merging DocBlock and phpDocumentor into one tool!
</p>
<blockquote>
Announcing phpDocumentor 2 - the merging of the old (phpDocumentor) and the new (DocBlox). With the first alpha release of phpDocumentor (2.0.0a1), the new "Responsive" default template sports a new page layout, along with the useful layout improvements that the original DocBlox templates provided (which remain available) over the old phpDocumentor templates (which will retire with old phpDocumentor). Explore this new template at <a href="http://demo.phpdoc.org/Responsive/index.html.">http://demo.phpdoc.org/Responsive/index.html</a>.
</blockquote>
<p>
Users of the current phpDocumentor software (version 1.x) will need to upgrade their documentation and installations. If you'd like more information about the transition or just keep up with the latest on this exciting advancement, check out #phpdocumentor on Freenode IRC or follow <a href="http://twitter.com/phpdocumentor">@phpdocumentor</a> on Twitter.
</p>]]></description>
      <pubDate>Fri, 16 Mar 2012 07:58:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Automating PHPUnit Tests in Windows Azure]]></title>
      <guid>http://www.phpdeveloper.org/news/17351</guid>
      <link>http://www.phpdeveloper.org/news/17351</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has posted another tutorial in a series looking at testing applications on the Azure platform. In <a href="http://blogs.msdn.com/b/silverlining/archive/2012/01/03/automating-phpunit-tests-in-windows-azure.aspx">this latest post</a> he talks about how to automate your <a href="http://phpunit.de">PHPUnit</a> tests as a part of the start up of the instance.
</p>
<blockquote>
In this post, I'll show you how to deploy your PHPUnit tests with your application, have the tests run as a start up task, and have the results written to your storage account for analysis. Attached to this post is a .zip file that contains a skeleton project that you can use to automatically run PHPUnit tests when you deploy a PHP application to Azure. I'll walk you though how to use the skeleton project, then provide a bit more detail as to how it all works (so you can make modifications where necessary).
</blockquote>
<p>He has it broken up into a few easy-to-follow steps:</p>
<ul>
<li>Download <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-25-21-34/AzurePHPWebRole.zip">the AzurePHPWebRole</a> zip archive and unpack it
<li>Copy your application, tests and PHP installation into the resulting file structure
<li>Create a skeleton "ServiceConfiguration.cscfg" file with the "cspack" command and edit it to change the "osfamily" and "osversion" settings
<li>Use "cspack" to package up the application and <a href="http://azurephp.interoperabilitybridges.com/articles/deploying-your-first-php-application-to-windows-azure#new_deploy">deploy the application</a>
</ul>
<p>
He walks you through the "how it works" steps too - the things that happen for you automatically on the server side to do things like set up the file to log to, configure the PHP environment and execute the "runtests" Powershell file as included in the AzurePHPWebRole download.
</p>]]></description>
      <pubDate>Thu, 05 Jan 2012 11:58:46 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: Setting up a connection to the Zend Developer Cloud on Linux]]></title>
      <guid>http://www.phpdeveloper.org/news/17204</guid>
      <link>http://www.phpdeveloper.org/news/17204</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> has a method in one of his latest posts for hooking your linux-based system <a href="http://www.eschrade.com/page/setting-up-a-connection-to-the-zend-developer-cloud-on-linux">into Zend's phpcloud</a> platform, complete with an automatic upload (so you're not constantly sftp-ing).
</p>
<blockquote>
Connecting with the Zend DevCloud in Linux is actually quite easy if you know how to use SFTP. [...] But, as I said in a previous post, I hate having to do command line stuff for each and every file or commit.  I like things to work seamlessly.  So what I did was write a PHP script that connects to the DevCloud (or any SSH-based endpoint for that matter) and then monitors all of the files and directories for changes, such as a creation, modification or deletion event. 
</blockquote>
<p>
His script (<a href="https://github.com/kschroeder/PHP-INotify-SFTP-script/blob/master/push-changes.php">available on github</a>) uses the  <a href="http://pecl.php.net/package/inotify">PECL inotify package</a> to work, but once its set up, you can have the PHP process running the script in the background, pointed at your web root, and have it upload automatically.
</p>]]></description>
      <pubDate>Fri, 02 Dec 2011 10:04:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ulf Wendel's Blog: PECL/mysqlnd_ms compared to a classic]]></title>
      <guid>http://www.phpdeveloper.org/news/16918</guid>
      <link>http://www.phpdeveloper.org/news/16918</link>
      <description><![CDATA[<p>
<i>Ulf Wendel</i> has a new post that <a href="http://blog.ulf-wendel.de/?p=318">compares the performance</a> of a classic method for using the mysqlnd plugin in MySQL replication to <a href=http://de2.php.net/mysqlnd_ms">mysqlnd_ms</a>, the replication and load balancing plugin for the mysqlnd driver (that works with the mysql and mysqli functionality and is, as of <a href="http://phpdeveloper.org/news/16913">this beta</a> of PHP, the default driver for MySQL connections).
</p>
<blockquote>
Recently I was asked if <a href="http://de2.php.net/mysqlnd_ms">PECL/mysqlnd_ms</a> should be used to add MySQL replication support to a yet to be developed PHP application. The <a href="http://blog.ulf-wendel.de/php.net/mysqlnd">mysqlnd</a> plugin, which supports all PHP MySQL extensions (PDO, mysqli, mysql), stood up against a classical, simple, proven and fast approach: one connection for reads, one connection for writes. Let's compare. This is a bit of an unfair challenge, because PECL/mysqlnd_ms was designed as a drop-in for existing applications, not optimized for those starting from scratch, *yell*... The plugin stands up quite well, anyway!
</blockquote>
<p>
He starts with a look at the "classical pattern" of using a factory or singleton to make a database object instance that gives back different connections for reads versus writes (slave vs master). The mysqlnd_ms plugin allows you to define configuration settings to tell the queries to automatically go to certain places for different actions. For example, you could use "master_on_write" to tell it to use a master node if you're doing an INSERT or UPDATE versus a SELECT. He also shows a more complex example using a SQL hint and one issue that might come from the "human element" - not paying attention to database character sets.
</p>]]></description>
      <pubDate>Wed, 28 Sep 2011 08:43:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: PHP Project Wizard]]></title>
      <guid>http://www.phpdeveloper.org/news/15865</guid>
      <link>http://www.phpdeveloper.org/news/15865</link>
      <description><![CDATA[<p>
In <a href="http://sebastian-bergmann.de/archives/908-PHP-Project-Wizard.html">this new post</a> to his blog <i>Sebastian Bergmann</i> mentions yet another new tool he's released - the PHP Project Wizard, a tool that helps with the creation of configuration files for setting up project build automation.
</p>
<blockquote>
<a href="https://github.com/sebastianbergmann/php-project-wizard">The PHP Project Wizard (PPW)</a> is a commandline tool that can be used to generate the scripts and configuration files necessary for the build automation of a PHP project. Given the location of a project's directories with sourcecode and tests as well as the project's name, the PHP Project Wizard generates scripts and configuration files necessary for build automation using <a href="http://ant.apache.org/">Apache Ant</a>.
</blockquote>
<p>
An example of its use is included - a simple call to the shell script with information about the source, tests and project directories. It then generates the XML files for Ant and PHPUunit to run. The result can then be used in the <a href="http://jenkins-php.org/">Jenkins jobs for PHP</a> setup seamlessly.
</p>]]></description>
      <pubDate>Mon, 07 Feb 2011 10:35:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: Zend Framework: Slow automatic view rendering]]></title>
      <guid>http://www.phpdeveloper.org/news/14271</guid>
      <link>http://www.phpdeveloper.org/news/14271</link>
      <description><![CDATA[<p>
In a new entry to his blog, <i>Till Klampaeckel</i> looks at <a href="http://till.klampaeckel.de/blog/archives/92-Zend-Framework-Slow-automatic-view-rendering.html">view rendering for Zend Framework</a> applications and how, as he assumed it would, making a change in the automatic rendering on the views could speed things up quite a bit.
</p>
<blockquote>
My thesis is that there's a gain in page rendering time when I disable automatic view rendering and use explicit render calls ($this->render('foo');) inside my controllers. And to cut to the chase, there is. On our  app, I measured a 12% improvement using Xdebug's profiler - simple before-after-style.
</blockquote>
<p>
He talks a bit about his setup for testing his theory complete with a customized loader as well as the platform (OS and web server) he ran the tests on. He used <a href="http://xdebug.org/docs/install">Xdebug</a> to run the testing. His conclusion is a pretty obvious one - what you gain in convenience you sacrifice in performance. 
</p>]]></description>
      <pubDate>Tue, 30 Mar 2010 14:50:16 -0500</pubDate>
    </item>
  </channel>
</rss>
