<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>mehblog: Beware register_globals</title>
    <link>http://blog.pauldalton.co.uk/articles/2005/03/07/beware-register_globals</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>random mumblings</description>
    <item>
      <title>Beware register_globals</title>
      <description>&lt;p&gt;We deployed a new site last week. Over the weekend I got a bug report from the site owner. Within the administration section of the site a certain session variable was getting reset causing a certain operation to fail.&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;Initially I was stumped. It worked fine on the dev server...  So I made sure that we had deployed the code to the live server correctly. Yup, all fine.&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;Versions of php were the same.&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;Well, to cut a long story short, register globals had been turned on in an apache config file for the previous version of the site and hadn't been removed when the new site was deployed.&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;This was causing a variable initialisation in one part of the code to overwrite an object in $_SESSION elsewhere.&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;Weird. Lesson learned...&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 07 Mar 2005 14:18:35 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5acc55fcff03ace59138beb8a21b3029</guid>
      <author>paul</author>
      <link>http://blog.pauldalton.co.uk/articles/2005/03/07/beware-register_globals</link>
      <category>PHP</category>
      <trackback:ping>http://blog.pauldalton.co.uk/articles/trackback/22</trackback:ping>
    </item>
  </channel>
</rss>
