<?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 10:30:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: Facter: Zend Server]]></title>
      <guid>http://www.phpdeveloper.org/news/17316</guid>
      <link>http://www.phpdeveloper.org/news/17316</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has <a href="http://www.adayinthelifeof.nl/2011/12/28/facter-zendserver/">shared a handy tip</a> for those using Zend Server on a pupptet-ed server - using a Facter plugin to check for the ZS install and only install what's needed (rather than end up with multiple PHP installs).
</p>
<blockquote>
This means you should not install the default PHP package for your distribution when the distribution also runs on Zend Server. This Facter plugin will allow you to use the $zendserver fact inside your own manifests to check if Zend server is installed, so you can take measures against installing stuff that is taken care of by ZendServer itself.
</blockquote>
<p>
You can download the plugin from his github account, <a href="https://github.com/jaytaph/puppet-facter-zendserver">https://github.com/jaytaph/puppet-facter-zendserver</a>, and easily install it into your puppet setup.
</p>]]></description>
      <pubDate>Wed, 28 Dec 2011 11:35:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: Check for a TTY or interactive terminal in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16809</guid>
      <link>http://www.phpdeveloper.org/news/16809</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Brian Moon</i> describes a need he had for detecting if the client or user calling a PHP script was <a href="http://brian.moonspot.net/tty-or-interactive-terminal-in-php">using an interactive terminal (TTY)</a> or not:
</p>
<blockquote>
Let's say I am trying to find out why some file import did not happen. Running the job that is supposed to do it may yield an error. Maybe it was a file permission issue or something. There are other people watching the alerts. What they don't know is that I am running the code and looking at these errors in real time.
</blockquote>
<p>
Since the errors were being sent to the log file, they were lost to the client/user on the other end left staring at their script wondering what went wrong. He ended up with a solution (a pretty simple one too) that uses <a href="http://www.php.net/posix_ttyname">posix_ttyname</a> and <a href="http://php.net/posix_isatty">posix_isatty</a>. He includes the little snippet of code he puts in his prepend file that checks for errors then checks for a TTY. If both are there, it turns off logging the errors to the file and sends them direct instead.
</p>]]></description>
      <pubDate>Fri, 02 Sep 2011 09:12:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Checking your site for malicious changes]]></title>
      <guid>http://www.phpdeveloper.org/news/16693</guid>
      <link>http://www.phpdeveloper.org/news/16693</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i>, in the wake of having security issues with his site, has <a href="http://www.codediesel.com/security/checking-your-site-for-malicious-changes">posted a hint</a> you could use to help detect when something has changed in important files in your application by checking their hash.
</p>
<blockquote>
Today a couple of hours back my site got compromised. Not much changes to the code, but the .htacces was changed and some code [...] was added to the .htaccess file, which redirected the traffic coming from search engines to a malware site. It has now been removed and to prevent any such changes to the .htaccess file in the future, I've written a small php script that compares the hash (SHA1) of the two major files that usually get compromised and compare them to the one originally stored. 
</blockquote>
<p>
It's not a preventative measure by any means, but it can help you keep track of if something's changed. Several issues have popped up in the major blogging engines that allow for changes to be made directly to files. These changes result in the <a href="http://php.net/sha1_file">sha hash</a> to be different and can be used to trigger a security alert. His sample code shows a basic call to <a href="http://php.net/mail">mail</a> an alert, but it could be as complex as you'd like (possibly even logging to a database or the like).
</p>]]></description>
      <pubDate>Tue, 09 Aug 2011 10:04:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Quality Assurance on PHP projects (and PHPLint)]]></title>
      <guid>http://www.phpdeveloper.org/news/16594</guid>
      <link>http://www.phpdeveloper.org/news/16594</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> has started a new series of posts on his blog about quality assurance in PHP projects with <a href="http://www.dragonbe.com/2011/07/quality-assurance-on-php-projects_14.html">this introduction</a> and a look at the first tool on his list <a href="http://www.dragonbe.com/2011/07/quality-assurance-on-php-projects.html">PHPLint</a>.
</p>
<blockquote>
Quality Assurance has become an increasing important part of web application development, especially with PHP applications. [...] Luckily there are a lot of tools available that allows you to increase quality of these web applications, and the best part is they are all based on PHP! Let's have a quick look at what tools are interesting to start improving quality assurance on your PHP projects.
</blockquote>
<p>
The <a href="http://www.dragonbe.com/2011/07/quality-assurance-on-php-projects.html">first tool</a>, PHPLint, helps you validate code against syntax errors and is built into the command-line PHP you already have. He describes its use, both on the command-line and in a pre-commit hook on his git repository
</p>
<p>
For more PHP QA-related information, he also points out <a href="http://www.amazon.com/gp/product/0470872497/ref=as_li_tf_tl?ie=UTF8&tag=in2it-20&linkCode=as2&camp=217145&creative=399373&creativeASIN=0470872497">the book</a> from <i>Sebastian Bergmann</i> and <i>Stefan Priebsch</i> as a good reference too.
</p>]]></description>
      <pubDate>Fri, 15 Jul 2011 08:26:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 16 Vital Checks Before Releasing a WordPress Theme]]></title>
      <guid>http://www.phpdeveloper.org/news/14911</guid>
      <link>http://www.phpdeveloper.org/news/14911</link>
      <description><![CDATA[<p>
On the NETTUTS.com blog today there's <a href="http://net.tutsplus.com/tutorials/wordpress/16-vital-checks-before-releasing-a-wordpress-theme/">a new post</a> that includes a list of sixteen things you need to be sure to check before releasing your WordPress theme.
</p>
<blockquote>
Releasing a WordPress theme on a marketplace, such as <a href="http://themeforest.net/">ThemeForest</a>, where the audience is so large and diverse, has some challenges. You cannot test a solution directly with the client. You need to plan in advance for all edge cases, and ensure that your theme is as customizable as possible. If you're inexperienced, chances are that some things will unfortunately slip through the cracks. Luckily for you, we have drawn on our hard-earned wisdom to help you avoid repeating the same mistakes we made.
</blockquote>
<p>Among the things they suggest checking are things like:</p>
<ul>
<li>Don't Display Comments on Protected Posts
<li>Introduce Right-To-Left Support
<li>Make Paginated Entries Work
<li>Do not Forget wp_footer() and wp_head()
<li>Support Custom Menus
<li>Make User-Visible Strings Translatable
</ul>
<p>
Each item on the list comes complete with a description and code (when it's needed).
</p>]]></description>
      <pubDate>Thu, 05 Aug 2010 13:48:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Teeman's Blog: Can you trust your Joomla extensions?]]></title>
      <guid>http://www.phpdeveloper.org/news/13488</guid>
      <link>http://www.phpdeveloper.org/news/13488</link>
      <description><![CDATA[<p>
In <a href="http://brian.teeman.net/extensions/can-you-trust-your-joomla-extensions.html">a recent post</a> to his blog <i>Brian Teeman</i> asks the question of Joomla users and developers - "can you trust your Joomla extensions?"
</p>
<blockquote>
Sadly in the last 6 months there have been two published circumstances where an extension provider has been hacked and malicious code inserted into the extensions that they offer. This meant that as soon as you installed the extension your site was vulnerable to defacement etc. If there have been two published cases perhaps there have been more that we don't know about. So is there anything we can do to prevent this?
</blockquote>
<p>
There is a sort of checking system in place with the <a href="http://en.wikipedia.org/wiki/Md5sum">md5sum</a> matching but it's not widely supported currently. Sites like the <http://extensions.joomla.org/">Joomla Extension Directory</a> would be prime candidates for sharing this sort of information to help protect those with Joomla installs all across the web. 
</p>
<p>
<i>Brian</i> also suggests a way to make it even more seamless - integrate the md5sum checking into the Joomla code itself to make it even simpler for users to verify they they've gotten the write package from the right source (with the right code inside).
</p>]]></description>
      <pubDate>Thu, 05 Nov 2009 11:01:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Content With Style: Quick lint check on changed php files with svn st and xargs]]></title>
      <guid>http://www.phpdeveloper.org/news/13409</guid>
      <link>http://www.phpdeveloper.org/news/13409</link>
      <description><![CDATA[<p>
On the Content with Style blog, there's <a href="http://www.contentwithstyle.co.uk/content/quick-lint-check-on-changed-php-files-with-svn-st-and-xargs">a "quickie"</a> you can drop into a subversion hook as a part of your check-in that will run the lint command on only the changed files (not your entire repository).
</p>
<blockquote>
If you haven't done it in a <a href="http://blueparabola.com/blog/subversion-commit-hooks-php">hook</a> already, here's the quick way to check all your changed files for syntax errors.
</blockquote>
<p>
This sort of command would be the most useful in a pre-commit hook to ensure that everything passes correctly. Their example only looks for ".php" files, but can be modified easily if you happen to use ".html" or another custom extension for your pages too.
</p>]]></description>
      <pubDate>Tue, 20 Oct 2009 08:27:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Cody Taylor's Blog: Checking Bits With PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12710</guid>
      <link>http://www.phpdeveloper.org/news/12710</link>
      <description><![CDATA[<p>
<i>Cody Taylor</i> has <A href="http://codytaylor.org/?p=14122">a quick post</a> to his blog about bit checking in PHP:
</p>
<blockquote>
PHP makes life a lot easier for quick or dirty maintenance scripts, cron jobs or web applications but how does it do for older, not so straight forward problems dealing with bits and bytes? I was surprised how easy it was to manipulate bits in a byte with php. Here is an function that made my life a fair amount easier when having to check for a specific bit in a byte.
</blockquote>
<p>
The function takes in the value and, after casting it to an int, checks to see how it compares to eight and returns it. This result can be passed through <a href="http://php.net/decbin">decbin</a> function for output. A handy table of the bitwise operator definitions is also included.
</p>]]></description>
      <pubDate>Thu, 18 Jun 2009 11:12:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DeveloperTutorials.com: Port Scanning and Service Status Checking in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12297</guid>
      <link>http://www.phpdeveloper.org/news/12297</link>
      <description><![CDATA[<p>
On the DeveloperTutorials.com site today there's <a href="http://www.developertutorials.com/tutorials/php/port-scanning-and-service-status-checking-in-php-8-06-06/page1.html">a new tutorial</a> showing the creation of a port scanner with PHP - a tool that, given some of the familiar ports that services (like web or email servers) run on, can check to see if they're responding.
</p>
<blockquote>
While building web applications, it's often important to keep an eye on the other services running on your server. Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.
</blockquote>
<p>
Their example makes a socket connection to the remote port to see if there's a valid hookup. The wrap this inside a loop for ports 1 through 1000 to see what ports are open and responding on your local machine (doing this on a remote machine is just asking for trouble).
</p>
<p>
Their full example defines some of the common ports in an array and loops to check on their status. It sets out a base you can build on top of with things like their suggestions - logging scan results, repoting downtime and running a service-specific task.
</p>]]></description>
      <pubDate>Wed, 08 Apr 2009 08:49:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Debuggable Blog: Supressing Errors in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11848</guid>
      <link>http://www.phpdeveloper.org/news/11848</link>
      <description><![CDATA[<p>
<i>Felix Geisendorfer</i> has posted two new items to the Debuggable blog looking at suppressing errors in your applications - and no, that doesn't mean <a href="http://www.phpdeveloper.org/news/11672">using the @ operator</a> either.
</p>
<blockquote>
As of late I am getting sick of some best practices I have taught myself. Never using the @-error suppressing operator quickly moving to the top of the list. Before you start crying out loud (I know you will), let me say this: I do not mean to encourage anybody to use the @-operator. Applying the practice herein introduced may result in permanent damage to your coding habits and could serve as a gateway behavior to writing shitty code.
</blockquote>
<p>
He gives an example in the <a href="http://debuggable.com/posts/suppressing-php-errors-for-fun-and-profit">first post</a> of a place where he failed to properly check to ensure an element existed before checking a element of it. The <a href="http://debuggable.com/posts/suppressing-suppressing-php-errors-with-emptiness">second post</a> provides an interesting solution to the same problem - using <a href="http://php.net/empty">empty</a> on the element/subelement to check its existence.
</p>]]></description>
      <pubDate>Fri, 30 Jan 2009 11:14:58 -0600</pubDate>
    </item>
  </channel>
</rss>

