<?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>Cory Collier &#187; debug</title>
	<atom:link href="http://corycollier.com/tag/debug/feed/" rel="self" type="application/rss+xml" />
	<link>http://corycollier.com</link>
	<description>Web Developer and System Administrator in Orlando, FL</description>
	<lastBuildDate>Mon, 12 Jul 2010 02:16:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Red Hat vs PDO vs PCRE vs Zend Lucene Search</title>
		<link>http://corycollier.com/2008/10/red-hat-vs-pdo-vs-pcre-vs-zend-lucene-search/</link>
		<comments>http://corycollier.com/2008/10/red-hat-vs-pdo-vs-pcre-vs-zend-lucene-search/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 01:37:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[pcre]]></category>
		<category><![CDATA[pdo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=236</guid>
		<description><![CDATA[Recently while working at my new job at Hydra Studio, my buddy Rob and I came across an issue that was killing us:  &#8220;Invalid parameter number: no parameters were bound&#8221;  When people used our search feature on our site, a few specific search terms would result in un-caught exceptions. Of course, this ONLY happened on [...]]]></description>
			<content:encoded><![CDATA[<p>Recently while working at my new job at <a title="Hydra Studio, a web design and development studio in Orlando, FL" rel="co-worker" href="http://hydrastudio.com">Hydra Studio</a>, my buddy <a title="Rob Ziener, a brilliant web developer in Orlando, FL" rel="friend co-worker&lt;br &gt;&lt;/a&gt;" href="http://robzienert.com/">Rob</a> and I came across an issue that was killing us: </p>
<blockquote><p>&#8220;Invalid parameter number: no parameters were bound&#8221;</p></blockquote>
<p> When people used our search feature on our site, a few specific search terms would result in un-caught exceptions. Of course, this ONLY happened on the client&#8217;s server. Nothing like saying a project is solid, only to find out there&#8217;s something &#8216;special&#8217; about the production environment.</p>
<p>The first thing we did, was to list out what was unique about the client&#8217;s server. The client was using a Media Temple box running CentOS 5.2. For the un-initiated, CentOS is the free version of Red Hat Enterprise Server. We run Macs in the office, and our staging server is a Mac too. Other than the OS, the normal &#8216;LAMP&#8217; stuff pretty much matched verbatim. </p>
<p>So, we started digging into the differences between the compiled versions of PHP between the development and production environments, and one thing popped out at us:</p>
<p>PCRE</p>
<p>The version that&#8217;s supported on Red Hat / CentOS is 6.6. That&#8217;s horrible. 6.6 came out nearly 3 years ago, and the version the client was running had no support for unicode at all. A little research, and we found out that Zend Search Lucene (what we built the search functionality on top of) requires unicode for the way it stores search indexes.</p>
<p>With that, we figured we were done. The client had a limitation on their server, they needed to address it, and the problem would fix itself when they did. Not quite so fast &#8230;</p>
<p>I was testing some of the searching on my iMac, when the same issue happened on my own computer. Disaster! Could it be that something in our own code was the culprit? What half-reproducible error was causing this? </p>
<p>After <em>hours</em> of searching for an answer on the googlez, I came across some help on the <a href="http://framework.zend.com/issues/browse/ZF-1343">Zend Issue Tracker</a>. It turns out, that PDO was failing when it was trying to prepare a statement, when that statement contained a question mark. When I switched my SQL adapter to Mysqli, the problem was solved. Both the production and the development environments were bug free after the change.</p>
<p>It turns out, that our search indexes would return fields that either contained question marks, because they actually existed in the document (as was the case locally), or because the document had encoding errors when the search index was built (as was the case on the production servers). The ORM we used would grab the documents, and grab relevant data from the database by querying with the fields stored in the index.</p>
<p>The SQL that was being prepared, would then look something like this:</p>
<blockquote><p>&#8216;SELECT id FROM folks WHERE first_name LIKE &#8216;Jo?hnny&#8217;</p></blockquote>
<p>The question marks would be interpreted by PDO as variable markers, which rightfully didn&#8217;t exist.</p>
<p>So, the real solution wound up being a little bit of a mix between the client&#8217;s problem, and our own. Granted, we needed to catch question marks being stored in db before they got there. That improves the longevity of our own code. However, the search functionality will still return results that <em>may</em> have question marks in them, thus causing the same issue. That issue is resolved by using Mysqli, but that feels more like a hack, than a solution.</p>
<p>Anyways, I spent a long time trying to search the answer to this and found nothing except the one mention in the issue tracker. For those of you using Zend Lucence Search on Red Hat / CentOS servers. Make sure you use Mysql if you&#8217;re using the Zend ORM to populate models based on results returned from the index. </p>
<p>Oh yeah, and make sure you filter your input too, Mr. Bobby Tables&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2008/10/red-hat-vs-pdo-vs-pcre-vs-zend-lucene-search/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Macbook &amp; Leopard Woes</title>
		<link>http://corycollier.com/2007/11/macbook-leopard-woes/</link>
		<comments>http://corycollier.com/2007/11/macbook-leopard-woes/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 05:27:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[review]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[troubleshoot]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=12</guid>
		<description><![CDATA[A while ago, I replaced a broken screen on my macbook. It was a difficult thing to do, and after I was done, I noticed I wasn&#8217;t able to use the CD / DVD drive any longer. I didn&#8217;t really care too much about the problem, until I got Leopard, and wanted to get it [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, <a href="http://tweakosx.com/index.php/2007/11/19/replace-macbook-screen-a-tutorial/">I replaced a broken screen on my macbook</a>. It was a difficult thing to do, and after I was done, I noticed I wasn&#8217;t able to use the CD / DVD drive any longer. I didn&#8217;t really care too much about the problem, until I got Leopard, and wanted to get it installed on the machine.</p>
<p>So, I got some tools from my buddy Derek, and got to work on it tonight. Taking apart a macbook is a delicate thing to do, and should be taken seriously. I laughed when my wife suggested I just screws into a bag so I didn&#8217;t lose them. Ideally, one should have a clean white surface to place screws that mimics the placement of them in the actual computer.</p>
<p>Anyways, after about an hour of disassembly and inspection, I figured out the issue. One of the brackets that sit above the CD / DVD drive was lodged underneath the CD / DVD player. I fixed the issue and re-assembled the computer in about 10 minutes. Not bad if I may say so myself.</p>
<p>Then I went to <a href="../leopard-was-worth-the-wait">install Leopard</a> .</p>
<p>The first time I attempted the install, I got everything started and left the machine alone. When I went to check on it about a half hour later, I saw a large notification that the install had failed. I tried to restart the machine to re-attempt the install a few times. Each time however, the installer couldn&#8217;t find the HD to install to.</p>
<p>Finally, I got a notification that the HD was formatted in a way that was incompatible for Leopard. If I proceeded with the install, I was going to have to wipe the HD clean. That was a bit daunting to hear, since my wife is the primary user of the computer. If I lose something she cares about, well, I don&#8217;t have to tell you the horrors I&#8217;d face then.</p>
<p>So, I got out my handy-dandy external HD. It&#8217;s really just a shell with an old 120GB IDE thrown in there, but it does the job well. I got everything I could figure she might want off of the computer, and re-started the install process.</p>
<p>When the computer asked where to install Leopard, I recieved the same prompt as before, but this time I went ahead with the install, knowing that I was formatting the hard drive.</p>
<p>After the format was complete, the installer proceeded. I left the machine alone, figuring that I had a while before I needed to do anything with it. About another half hour later I checked on it, only to see another &#8220;Install Failed&#8221; screen. Now I was in a serious bind: would my wife be without a computer at all?</p>
<p>Well, <a href="../upgrading-software-can-be-hell">I&#8217;ve always been one to keep trying until something gives up and works for me</a> . So, I re-started the install again. This time however, I was happy to see that it worked! I went through the typical post-install steps, and was delighted to see my wife&#8217;s macbook successfully running Leopard.</p>
<p>The one issue that did come up afterwards however, was all my iLife apps were gone. I suppose I can&#8217;t complain too much about it. I didn&#8217;t pay for the original iLife apps, so I&#8217;m not out any money. But still, It&#8217;d be really nice to not have to buy soemthing I already had on here.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/11/macbook-leopard-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Server SBS 2003 and RRAS Headaches</title>
		<link>http://corycollier.com/2007/06/windows-server-sbs-2003-and-rras-headaches/</link>
		<comments>http://corycollier.com/2007/06/windows-server-sbs-2003-and-rras-headaches/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 17:04:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[rras]]></category>
		<category><![CDATA[sbs]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[troubleshoot]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=42</guid>
		<description><![CDATA[Not long ago I got the task of setting up a small server for an engineer in our building. He has a small office with one other person working for him. The idea was for him to have a central repository for files, a system backing up those files, and the ability to remotely access [...]]]></description>
			<content:encoded><![CDATA[<p>Not long ago I got the task of setting up a small server for an engineer in our building. He has a small office with one other person working for him. The idea was for him to have a central repository for files, a system backing up those files, and the ability to remotely access all of those files.</p>
<p>I recommended a Windows SBS 2003 box. The client obliged.</p>
<p>All was fine until the issue of VPN came up. I&#8217;ve done VPN&#8217;s before, but usually it&#8217;s through hardware, not through the OS. The client eventually was paid in full, and the issue still wasn&#8217;t completely resolved. I felt terrible about it, so I made it my priority to fix. The client was really cool, and I didn&#8217;t want them to feel cheated or upset in any way.</p>
<p>I won&#8217;t go through the whole tutorial on how to setup an SBS box, but I will say that usually, it&#8217;s very intuitive. Well, when I set up the box, I configured it to work on one subnet. However, the modem supplied to the client wouldn&#8217;t allow GRE packets through, so they needed to get a new modem.</p>
<p>When that modem arrived, it didn&#8217;t work with their existing Linksys wireless router. So I used the modem as the router, and plugged the wireless box into it, and ran it as a separate subnet. Keep in mind, this was after I had already configured the SBS box for the previous subnet.</p>
<p>I thought I had configured the server to work with the new network settings, but I missed a couple of items.</p>
<p>Clear ARP cache.</p>
<p>Since RRAS was started, you couldn&#8217;t clear the ARP cache (the table with the addresses of machines according to the old subnet). I had to stop the RRAS service to clear the ARP cache. Keep that in mind if you have to move an SBS box from one network to another.</p>
<p>Change ALL network settings. When I changed the TCP/IP information for the network adapter (only one), I only changed the information on the front dialog box. Which means I forgot to change the WINS information! Since the client was using VPN so he could navigate to files on the network, that was pretty important.</p>
<p>Also, I needed to add the dns suffix to the DNS settings area as well.</p>
<p>The moral of the story, take the time to get it done right the first time.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/06/windows-server-sbs-2003-and-rras-headaches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternative PHP Cache Problems</title>
		<link>http://corycollier.com/2007/05/alternative-php-cache-problems/</link>
		<comments>http://corycollier.com/2007/05/alternative-php-cache-problems/#comments</comments>
		<pubDate>Thu, 31 May 2007 18:32:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[troubleshoot]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=28</guid>
		<description><![CDATA[Recently, Derek and I were running into problems with CGI errors on our development server for NFI Studios. We had recently upgraded our PHP install from 5.0 to 5.2, so we started looking for differences between the two. After a brief search on Google, I came up with a German forum with a potential solution: [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="http://derekgallo.com/">Derek</a> and I were running into problems with CGI errors on our development server for <a href="http://nfistudios.com/">NFI Studios</a>. We had recently upgraded our PHP install from 5.0 to 5.2, so we started looking for differences between the two.</p>
<p>After a brief search on Google, I came up with a German forum with a potential solution: APC (Alternative PHP Cache). It turns out that Caching for PHP 5.2 is different than for PHP 5.0. So, I turned of APC (by editing the php.ini file).</p>
<p>For all of you coders out there, just an FYI.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/05/alternative-php-cache-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
