<?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>Tue, 21 May 2013 20:47:47 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lars Tesmer's Blog: Learning Ruby: Gotchas and Pitfalls for PHP Programmers]]></title>
      <guid>http://www.phpdeveloper.org/news/16856</guid>
      <link>http://www.phpdeveloper.org/news/16856</link>
      <description><![CDATA[<p>
<i>Lars Tesmer</i> is currently in the process of learning Ruby. He' been working through the tutorials and some sample scripts and has come across some pitfalls along the way. In his <a href="http://lars-tesmer.com/blog/2011/09/13/learning-ruby-gotchas-and-pitfalls-for-php-programmers/">latest post</a> he shares four of them that've stood out in his development so far.
</p>
<blockquote>
I'm currently learning Ruby. In this post I'll list some pitfalls for programmers coming from PHP that would probably cause some confusion if you aren't aware of them. This list is by no means complete, while I learn Ruby I'll very probably encounter more gotchas, which I will blog about, too.
</blockquote>
<p>
For each of his four examples, he gives the code PHP developers are used to seeing and the Ruby code that may or may not do what you'd expect:
</p>
<ul>
<li>Arrays are continuous
<li>Zero is not falsy
<li>The keywords private and protected
<li>There's no static keyword
</ul>]]></description>
      <pubDate>Wed, 14 Sep 2011 09:48:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[CodeFury.net: CodeIgniter/PHP + IIS + MySQL + MSSQL: It Works!]]></title>
      <guid>http://www.phpdeveloper.org/news/15735</guid>
      <link>http://www.phpdeveloper.org/news/15735</link>
      <description><![CDATA[<p>
<i>Kenny Katzgrau</i> has a recent post on the Code Fury blog talking about the combination of <a href="http://codefury.net/2011/01/codeigniter-php-iis-mysql-mssql/">CodeIgniter, IIS, MySQL and MSSQL</a> and how it all works in his installation (after a few small gotchas).
</p>
<blockquote>
There are a lot of people out there who call themselves "LAMP" developers - short for Linux, Apache, MySQL, PHP. That's the standard configuration for production PHP applications. Recently, I ended up having to build a CodeIgniter application on Windows, IIS, Mysql+MS-SQL, and PHP. Sound like there are bound to be issues? You bet, and it especially hurts because now I'm a real-live WIMP developer. And what made it even more interesting was that due to constraints, I had to develop the application in Ubuntu and deploy to Windows for production.
</blockquote>
<p>
He includes the list of the "gotchas" that he came across when doing the installation - six of them:
</p>
<ul>
<li>PHP and MSSQL on Ubuntu
<li>PHP and MSSQL on Windows
<li>mssql vs. sqlsrv
<li>File Permissions and Logging
<li>No .htaccess Fo' You!
<li>2 Databases, 1 Application
</ul>]]></description>
      <pubDate>Thu, 13 Jan 2011 11:09:50 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: Gotcha on Scraping .NET Applications with PHP and cURL]]></title>
      <guid>http://www.phpdeveloper.org/news/14730</guid>
      <link>http://www.phpdeveloper.org/news/14730</link>
      <description><![CDATA[<p>
New on his blog today <i>Matthew Turland</i> has <a href="http://matthewturland.com/2010/06/30/gotcha-on-scraping-net-applications-with-php-and-curl/">posted about a "gotcha"</a> he came across when working with cURL to pull down information (scrape content) from a remote .NET application.
</p>
<blockquote>
I recently wrote a PHP script to scrape data from a .NET application. In the process of developing this script, I noticed something interesting that I thought I'd share. In this case, I was using the cURL extension, but the tip isn't necessarily specific to that. One thing my script did was submit a POST request to simulate a form submission. [...] The issue I ran into had to do with a behavior of the CURLOPT_POSTFIELDS  setting that's easy to overlook.
</blockquote>
<p>
The problem was something cURL does automatically - change the header for the content type because you're sending an array. Thankfully, with the help of a call to <a href="http://php.net/http_build_query">http_build_query</a> to encode it correctly, the request will use the right headers.
</p>]]></description>
      <pubDate>Thu, 01 Jul 2010 08:51:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Wenz's Blog: Serendipity Upgrade to v 1.5.x Gotcha]]></title>
      <guid>http://www.phpdeveloper.org/news/13726</guid>
      <link>http://www.phpdeveloper.org/news/13726</link>
      <description><![CDATA[<p>
<i>Christian Wenz</i> <a href="http://www.hauser-wenz.de/s9y/index.php?/archives/286-Serendipity-Upgrade-to-v-1.5.x-Gotcha.html">points out a "gotcha"</a> for those upgrading Serendipity to the latest 1.5.x version - an issue with a SQL script not being run.
</p>
<blockquote>
I just updated <a href="http://s9y.org/">Serendipity</a> to version 1.5.1 on one of our servers; yet afterwards I could not log in anymore. Also, Serendipity reported that version 1.5.1 was present, although I did not run the update script from the admin console yet. At first I thought I did something wrong, but a <a href="http://board.s9y.org/viewtopic.php?f=1&t=16125">s9y forum posting</a> described a similar issue.
</blockquote>
<p>
The issue came from a SQL update script that hadn't been run when the upgrade process thought it had. He includes the two SQL statements you'll need to run to fix the problem.
</p>]]></description>
      <pubDate>Thu, 24 Dec 2009 06:44:55 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Tutorials Blog: Migrating legacy PHP 4 applications to PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/10574</guid>
      <link>http://www.phpdeveloper.org/news/10574</link>
      <description><![CDATA[<p>
In <a href="http://www.developertutorials.com/blog/javascript/migrating-legacy-php-4-applications-to-php-5-320/">a new post</a> to the Developer Tutorials blog <i>Akash Mehta</i> takes a look at migrating PHP4 applications up to the more recent versions of PHP5.
</p>
<blockquote>
PHP 5 supports most of the legacy syntax features of PHP 4. Most code written for PHP 4 should function fine under PHP 5, and a comprehensive test suite could check this. However, many of the backwards-incompatible changes in PHP 5 were in regard to language quirks, and quite a few hacks rely on these in order to function.
</blockquote>
<p>
He points out some of these hacks including changes to the object model and updates to the way variables are handled (breaking many "bad use" cases). He also points out the changes made in the latest Windows binaries as well as some of the new reserved keywords that could conflict with pre-existing code in your application.
</p>]]></description>
      <pubDate>Thu, 10 Jul 2008 07:56:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Eirik Hoem's Blog: Array problems with SOAP and PHP - Updated]]></title>
      <guid>http://www.phpdeveloper.org/news/9790</guid>
      <link>http://www.phpdeveloper.org/news/9790</link>
      <description><![CDATA[<p>
<i>Eirik Hoem</i> has <a href="http://eirikhoem.wordpress.com/2008/03/13/array-problems-with-soap-and-php-updated/">posted an update</a> on a <a href="http://eirikhoem.wordpress.com/2007/05/23/array-problems-with-x-fire-soap-and-php">previous problem</a> he was having when working with SOAP in PHP and its handling of arrays.
</p>
<blockquote>
The scenario was that when an array with only one object was returned over SOAP the array was discarded and pointed straight to the single object.
</blockquote>
<p>
Come to find out, this behavior wasn't a bug, it was <a href="http://bugs.php.net/bug.php?id=36226">a feature</a> - the fix is to add another parameter to the initialization of the SoapClient to add the SOAP_SINGLE_ELEMENT_ARRAYS feature.
</p>]]></description>
      <pubDate>Thu, 13 Mar 2008 10:22:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPEverywhere: Octopussy numbers in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/9543</guid>
      <link>http://www.phpdeveloper.org/news/9543</link>
      <description><![CDATA[<p>
<i>John Lim</i> has <a href="http://phplens.com/phpeverywhere/?q=node/view/249">posted about</a> an interesting bug he's come across when working with the output of two strings that should look the same:
</p>
<blockquote>
Someone reported a bug in ADOdb, the open source db library i maintain. I went crazy for half an hour until i realised the problem.
</blockquote>
<p>
According to him, "if you expect the above code to produce the same values, you are sadly mistaken". His example gives an interesting result for the first echo statement - not echoing the 9 in the first character like it seems would make sense. Check out <a href="http://phplens.com/phpeverywhere/?q=node/view/249">his post</a> for the code and try it out for yourself.
</p>]]></description>
      <pubDate>Fri, 01 Feb 2008 09:21:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[David Coallier's Blog: PHP Namespaces (Part 1: Basic usage & gotchas)]]></title>
      <guid>http://www.phpdeveloper.org/news/8492</guid>
      <link>http://www.phpdeveloper.org/news/8492</link>
      <description><![CDATA[<p>
<i>David Coallier</i> has <a href="http://blog.agoraproduction.com/index.php?/archives/47-PHP-Namespaces-Part-1-Basic-usage-gotchas.html">posted his look</a> at the namespace support that will be included with PHP6, specifically some examples of their basic usage and things to look out for when using them in your applications.
</p>
<blockquote>
Well, PHP has namespaces now! Time to start educating people on that long awaited feature and for the people that already do know namespaces from C++, you also need to read this, it's simple, but will give you the basic syntax.
</blockquote>
<p>
He <a href="http://blog.agoraproduction.com/index.php?/archives/47-PHP-Namespaces-Part-1-Basic-usage-gotchas.html">starts with</a> things like "what is a namespace?" or "what are they used for?" before getting into the syntax. The next step up is explaining how they work - he uses an example project, ProjectOne, with its namespace definition and an example script (invoke.php) that uses this class (including the new "import" keyword and the double-colon namespace separator).
</p>]]></description>
      <pubDate>Mon, 20 Aug 2007 15:12:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DotVoid.com: PHP streams and http 1.1 gotcha]]></title>
      <guid>http://www.phpdeveloper.org/news/5031</guid>
      <link>http://www.phpdeveloper.org/news/5031</link>
      <description><![CDATA[If you work with streams in PHP, <i>Dotvoid</i> has a tip that just might come in handy some day in the future. <a href="http://www.dotvoid.com/view.php?id=58">The tip</a> deals with the difference between HTTP 1.1 and 1.0.
<p>
<quote>
<i>
I have a class that I wrote some time ago that is called URLImporter. It's simple, does what it is supposed to do and thus makes my life easier. Essentially it helps me fetch URL resources - mostly dynamically generated data from password protected extranets that require me to use HTTP POST.
<p>
Up until recently this class have only been used behind an http proxy. The other day I moved it to another machine - that is not behind a proxy and suddenly it stopped working.
</i>
</quote>
<p>
He realized the problem after a bit of research - HTTP 1.1 automatically performs a "keep alive" on the connection, not timing out after the transaction's done like 1.0 does. <a href="http://www.dotvoid.com/view.php?id=58">His solution?</a> Passing another HTTP header to the stream connection: "Connection: close".]]></description>
      <pubDate>Thu, 23 Mar 2006 06:52:50 -0600</pubDate>
    </item>
  </channel>
</rss>
