<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pain Builds Character &#187; php</title>
	<atom:link href="http://www.mikemaxwell.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikemaxwell.net</link>
	<description>The official blog of Mike Maxwell... whatever that's worth!</description>
	<lastBuildDate>Tue, 28 Jul 2009 22:18:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WAMP and &quot;Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result&quot;</title>
		<link>http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/</link>
		<comments>http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 18:11:09 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/</guid>
		<description><![CDATA[This is the story of how one simple setting can waste valuable time. I was working on a project that involves some basic PHP and MySQL modifications. In order to do the development work and the testing, I used my local WAMP server installation. I downloaded the files and nailed down the most obvious environmental [...]]]></description>
			<content:encoded><![CDATA[<p>This is the story of how one simple setting can waste valuable time. I was working on a project that involves some basic PHP and MySQL modifications. In order to do the development work and the testing, I used my local WAMP server installation. </p>
<p>I downloaded the files and nailed down the most obvious environmental variables before even trying to run the client&#8217;s script in my local environment. No biggie &#8211; create a dupe of the database and the db user, make sure the script connects to my local instance of MySQL, etc. I knew the script should run since it worked well already in the client&#8217;s production environment.</p>
<p>Once the tweaking was done I gave it a try and immediately saw this error: </p>
<h5>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result</h5>
<p>My first thought was that I&#8217;d missed something with the local variables because the actual line of code that PHP puked on looked fine. I tested the SQL query, ran through the code a few times and began to seriously worry about my competence. </p>
<p>But then I realized all of the PHP open tags were written in short form:</p>
<p>&#8212;</p>
<p>&lt;?</p>
<p>// various PHP code</p>
<p>?&gt;</p>
<p>&#8212;</p>
<p>By default, WAMP does not support the short open tag. All I had to do was enable that particular setting in WAMP&#8217;s PHP settings, and PRESTO: instant functionality.</p>
<p>I&#8217;ve read several forums where this error appeared for other developers, but none of the forums said anything that connected the PHP setting of short open tag support. Hopefully this will help somebody someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
