<?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>The Dev Pages</title>
	<atom:link href="http://www.n8williams.com/devblog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.n8williams.com/devblog</link>
	<description>A knowledge base for simple (and beyond) web applications development</description>
	<lastBuildDate>Mon, 07 Nov 2011 08:31:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using postfix on linux for sending only outgoing messages</title>
		<link>http://www.n8williams.com/devblog/general_dev/using-postfix-on-linux-for-sending-only-outgoing-messages</link>
		<comments>http://www.n8williams.com/devblog/general_dev/using-postfix-on-linux-for-sending-only-outgoing-messages#comments</comments>
		<pubDate>Mon, 07 Nov 2011 08:23:52 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=237</guid>
		<description><![CDATA[Summary: What you want is to set up a null client. http://www.postfix.org/faq.html#null_client See my notes below for what constitutes an ’smtp server entry’.
So for my local dev environments I’ve been in the habit of setting up php’s mail function to work by doing a ’sudo apt-get install sendmail’ and editing the php.ini to point the [...]]]></description>
			<content:encoded><![CDATA[<p>Summary: What you want is to set up a null client. http://www.postfix.org/faq.html#null_client See my notes below for what constitutes an ’smtp server entry’.</p>
<p>So for my local dev environments I’ve been in the habit of setting up php’s mail function to work by doing a ’sudo apt-get install sendmail’ and editing the php.ini to point the sendmail_path to /usr/sbin/sendmail. (I’d recommend this procedure only if you’re working locally and don’t plan on opening port 25 to anything public, won’t want to mess with domain names, and won’t be dealing with mx records, etc.).</p>
<p>Well when I actually had to setup a server with a public domain, and needed emails to work efficiently from php with a qualified domain while worrying about port 25 being secure, I was in for some fun. For starters I’d recommend postfix over sendmail. Much easier to configure. Sendmail has many more config files, and you have to re-compile some of them after edits, etc. So once you have postfix installed, if you just want to send outgoing emails, then you can increase security and reduce overhead by making postfix not listen on the SMTP port. I wanted postfix as an smtp client only. With sendmail you can do this, and even kill all the daemons. With postfix you still need the daemon going, but when we’re done, nothing will be listening on port 25, smtp.</p>
<p>So what we are setting up is called a ‘null client’. You just have to modify /etc/postfix/main.cf and master/cf according to the instructions at http://www.postfix.org/faq.html#null_client.</p>
<p>The main thing that was unclear to me is what line(s) constitute a ‘SMTP server entry’ in master.cf. After commenting out the line close to the top with ’service’ as ’smtp’ and ‘type’ as ‘inet’, I figured this was enough, as ’sudo lsof -i’ indicated nothing was listening on port 25, or as smtp. I would leave the other smtp service entries alone, the ones with ‘type’ as ‘unix’.</p>
<p>Then do ’sudo postfix reload’ and for good measure we may as well do ’sudo /etc/init.d/postfix restart’, or the equivalent on your linux distro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/using-postfix-on-linux-for-sending-only-outgoing-messages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git permissions error: unable to create temporary sha1 filename ./objects/19: File exists</title>
		<link>http://www.n8williams.com/devblog/git/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists</link>
		<comments>http://www.n8williams.com/devblog/git/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#comments</comments>
		<pubDate>Mon, 07 Nov 2011 08:19:58 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=235</guid>
		<description><![CDATA[I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see:
error: unable to create temporary sha1 filename ./objects/19: File exists
If you get this error (Where 19 is a number unique [...]]]></description>
			<content:encoded><![CDATA[<p>I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see:</p>
<p>error: unable to create temporary sha1 filename ./objects/19: File exists</p>
<p>If you get this error (Where 19 is a number unique to your situation), then it is probably a permissions issue. On the remote server, make sure the remote bare repos, and ALL subfolders and files are owned by the appropriate (usually git) user. What is annoying is that somehow in the course of pretty normal git tasks, a non-git user was assigned ownership, or the git user was denied rights somehow. I forgot to check what the bad permissions were before I chowned and chgrped the files.</p>
<p>Once I logged in as an admin, changed to the git user’s home directory where all the remote bare repos exist, and issued ’sudo chown -R git ./’ and ’sudo chgrp -R git ./’ all was well.</p>
<p>I think the way to avoid this error is to make sure you are using the git user if you are pushing changes on the same server as the remote git repos.</p>
<p>See a more in depth discussion at <a target="_blank" href="http://kerneltrap.org/mailarchive/git/2008/11/28/4258264/thread">http://kerneltrap.org/mailarchive/git/2008/11/28/4258264/thread</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/git/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the mail() function in php with postfix on linux</title>
		<link>http://www.n8williams.com/devblog/general_dev/using-the-mail-function-in-php-with-postfix-on-linux</link>
		<comments>http://www.n8williams.com/devblog/general_dev/using-the-mail-function-in-php-with-postfix-on-linux#comments</comments>
		<pubDate>Mon, 07 Nov 2011 08:15:41 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=232</guid>
		<description><![CDATA[See http://ykyuen.wordpress.com/2011/02/06/configure-postfixsendmail-for-php-mail-in-ubuntu/
]]></description>
			<content:encoded><![CDATA[<p>See <a href="http://ykyuen.wordpress.com/2011/02/06/configure-postfixsendmail-for-php-mail-in-ubuntu/">http://ykyuen.wordpress.com/2011/02/06/configure-postfixsendmail-for-php-mail-in-ubuntu/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/using-the-mail-function-in-php-with-postfix-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery checking if a selector worked or is valid</title>
		<link>http://www.n8williams.com/devblog/javascript_and_ajax/jquery-checking-if-a-selector-worked-or-is-valid</link>
		<comments>http://www.n8williams.com/devblog/javascript_and_ajax/jquery-checking-if-a-selector-worked-or-is-valid#comments</comments>
		<pubDate>Mon, 22 Mar 2010 18:12:19 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Javascript and AJAX]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=226</guid>
		<description><![CDATA[So if a jQuery selector failed to match it used to return the document at the root level of the DOM. Now it will return an empty set. What is an empty set? If you do var test = jQuery(); you&#8217;ll get the thing &#8212; an empty jQuery wrapper object that appears around every selected [...]]]></description>
			<content:encoded><![CDATA[<p>So if a jQuery selector failed to match it used to return the document at the root level of the DOM. Now it will return an empty set. What is an empty set? If you do var test = jQuery(); you&#8217;ll get the thing &#8212; an empty jQuery wrapper object that appears around every selected element when using jQuery selectors. </p>
<p>So, if you do $(&#8217;#bogusId)&#8217;, you should get a jQuery object with a length of zero. I think that is the best way I have seen to tell if nothing was matched, just check for a length of zero on the result of calling something that doesn&#8217;t match.</p>
<p>if($(&#8217;#bogusID&#8217;).length ==0)</p>
<p>OR </p>
<p>var myjQueryElement = $(&#8217;#bogusID&#8217;);<br />
if(myjQueryElement.length == 0 )</p>
<p>You can also use size()</p>
<p>See <a href="http://api.jquery.com/jQuery/" target="_blank">http://api.jquery.com/jQuery/</a></p>
<p>&#8216;As of jQuery 1.4, calling the jQuery() method with no arguments returns an empty jQuery set. In previous versions of jQuery, this would return a set containing the document node.&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/javascript_and_ajax/jquery-checking-if-a-selector-worked-or-is-valid/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gem install rails on VirtualBox Ubuntu guest on a Windows 7 host times out</title>
		<link>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out</link>
		<comments>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:45:12 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=220</guid>
		<description><![CDATA[Apparently if you have the network interface as NAT (the most standard one) then the gem installer has issues connecting to remote sources. Use a bridged network connection, or download all the gems you need separately for rails, and install each using the gem install GEMNAME &#8211;local command in the folder where you download the [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently if you have the network interface as NAT (the most standard one) then the gem installer has issues connecting to remote sources. Use a bridged network connection, or download all the gems you need separately for rails, and install each using the gem install GEMNAME &#8211;local command in the folder where you download the gems. (I couldn&#8217;t get the bridged connection to work either, so I just installed all the gems by downloading each gem separately. Sort of annoying, but once you know how to do it, and what the dependencies are (rails has sort of a lot, but not too bad), it is easy. Use rubygems.org and not rubyforge.org)</p>
<p>This is weird since other remote gems work fine. The link at the bottom discusses how this might be a bug or something. Very annoying though, getting to the point where you find that it isn&#8217;t a linux problem, but a virtualbox and rubygems thing.</p>
<p>To get to the nitty gritty you have to do sudo gem install -V &#8211;debug (for verbose debugging). </p>
<p>The first level of error, by using the -V verbose option will show<br />
Error fetching remote data: timed out (on some remote gem), and then eventually the non-verbose error:</p>
<p>ERROR: While executing gem &#8230; (Gem::RemoteFetcher::FetchError) timed out (http://rubygems.org/gems/rails-x.x.x.gem)</p>
<p>To get to the root of the problem, you use the &#8211;debug flag which will show</p>
<p>Exception `NameError&#8217; at YOURENV/command_manager.rb:161 &#8211; uninitialized constant<br />
Gem::Commands::InstallCommand<br />
Exception `Gem::LoadError&#8217; at YOURENV<br />
rubygems.rb:826 &#8211; Could not find RubyGem sources (> 0.0.1)<br />
Exception `Errno::ETIMEDOUT&#8217; at YOURENV/net/</p>
<p>See <a href="http://www.ruby-forum.com/topic/204146" target="_blank">http://www.ruby-forum.com/topic/204146</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing newer version of rails on ubuntu 9.10 karmic koala</title>
		<link>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala</link>
		<comments>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala#comments</comments>
		<pubDate>Sat, 27 Feb 2010 23:22:01 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=209</guid>
		<description><![CDATA[I had a bunch of weird errors, like actionpack requires a certain version of rack, etc. when trying to use the gem install rails and other such commands.
I found it easier to remove any gems that were old, and then just download each gem dependency from rubyforge.org. Then I could download each gem, go to [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bunch of weird errors, like actionpack requires a certain version of rack, etc. when trying to use the gem install rails and other such commands.</p>
<p>I found it easier to remove any gems that were old, and then just download each gem dependency from rubyforge.org. Then I could download each gem, go to that download folder in the command line, and run sudo gem install <em>GEMNAME </em>- -local, and make sure the versions I wanted for everything were correct</p>
<p>ruby extconf.rb install mysql<br />
extconf.rb:1:in `require&#8217;: no such file to load &#8212; mkmf (LoadError)<br />
        from extconf.rb:1</p>
<p>Make sure the package rubyXX-dev is installed. This will stop the mkmf errors.</p>
<p>ruby extconf.rb install mysql<br />
extconf.rb:1:in `require&#8217;: no such file to load &#8212; mkmf (LoadError)<br />
        from extconf.rb:1</p>
<p>When installing the mysql gem in ubuntu make sure you have the following 3 packages installed: build-essential, rubyXX-dev, and libmysqlclientXX-dev, where the XXs correspond to your version numbers. </p>
<p>If you want to read the log, in ubuntu 9.10 with ruby 1.8.7 and rails 2.3.4 it was in /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mkmf.log</p>
<p>Also be aware that 9.10 ubuntu&#8217;s default mysql sock appears to be /var/run/mysqld/mysqld.sock</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails and Flex using rubyamf association errors</title>
		<link>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors</link>
		<comments>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:43:16 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=196</guid>
		<description><![CDATA[I&#8217;ll have to re-duplicate the exact error message on ruby&#8217;s side. From what I recall, this was obscured by a bunch of weird error messages that were deep in the codebase for rubyamf.
Basically, if your rails server barfs a bunch of errors when you try and load activerecord objects from an amf request, one cause [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll have to re-duplicate the exact error message on ruby&#8217;s side. From what I recall, this was obscured by a bunch of weird error messages that were deep in the codebase for rubyamf.</p>
<p>Basically, if your rails server barfs a bunch of errors when you try and load activerecord objects from an amf request, one cause of this can be the fact that you have associations setup in your rubyamf_config.rb file, and there are bad or missing foreign keys in the database for linking associated tables.</p>
<p>In the following example ruby barks when an account is loaded. Account has a location_id in the database to a location. If the location record with that id does not exist, ruby does not throw a nice error.</p>
<div class="text-box">
<pre>
<code>ClassMappings.register(:actionscript =&gt; 'Account', :ruby =&gt; 'Account', :type =&gt; 'active_record',
    :attributes =&gt; ["id", "location_id", "verified", "org_id", "login", "password", "email",  "name_title", "name_first","name_middle",
        "name_last","name_suffix","phone","phone_2","phone_3","last_login_at", "created_at", "updated_at", "business", "residential"],
    <span style="color:#CC6666">:associations =&gt; ["locations"]</span>)</code>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Vertical Overlapping of floating divs</title>
		<link>http://www.n8williams.com/devblog/css/css-vertical-overlapping-of-floating-divs</link>
		<comments>http://www.n8williams.com/devblog/css/css-vertical-overlapping-of-floating-divs#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:10:58 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[CSS and Stylesheeting]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=155</guid>
		<description><![CDATA[I thought this involved some trickiness. I needed to have a row of floating divs have the content underneath it pulled up over it, just a little bit, so that some body tabs appeared to the right of one of the floating images in the header.
After much testing and trial and error I figured out [...]]]></description>
			<content:encoded><![CDATA[<p>I thought this involved some trickiness. I needed to have a row of floating divs have the content underneath it pulled up over it, just a little bit, so that some body tabs appeared to the right of one of the floating images in the header.</p>
<p>After much testing and trial and error I figured out that the content below overlaps the content above depending on the dimensions of the div above it. The content below will STOP overlapping when it hits the image above UNLESS you <strong>make the height of the above div (that contains the image/content) to be smaller than the image/content itself</strong>. It appears by default, the height of the div containing the image is the same as the image (makes sense).</p>
<p>So the trickiness is in fooling the div below to overlap the div above, when the div below sees the above div as smaller in height than the image it contains.</p>
<p>I&#8217;ll post my html in the off-chance that someone can find and use this info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/css/css-vertical-overlapping-of-floating-divs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and MySQL setup on Mac OS X 10.5 Leopard</title>
		<link>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard</link>
		<comments>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard#comments</comments>
		<pubDate>Thu, 10 Sep 2009 23:45:45 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=91</guid>
		<description><![CDATA[Full fledged open-source MAMP development environment with php, mysql, and apache on Mac OS X 10.5 Leopard
Goal: A complete php development environment using Mac OS X 10.5 Leopard&#8217;s out of the box apache2/php install, and an install of the latest mysql and eclipse software with all the necessary plugins for php debugging. ALL 64-BIT! 
Admittedly, [...]]]></description>
			<content:encoded><![CDATA[<h2>Full fledged open-source MAMP development environment with php, mysql, and apache on Mac OS X 10.5 Leopard</h2>
<p><strong>Goal: A complete php development environment using Mac OS X 10.5 Leopard&#8217;s out of the box apache2/php install, and an install of the latest mysql and eclipse software with all the necessary plugins for php debugging. ALL 64-BIT! </strong></p>
<p>Admittedly, it was a challenge to get a fully functioning php dev environment up based on Mac OS X 10.5 Leopard&#8217;s configuration. But I succeeded in not installing a separate apache/php 32-bit install, or bailing out to use a linux Virtual Box.</p>
<h2>Enabling PHP</h2>
<h3>PHP5</h3>
<p>This one was pretty easy. Just uncomment out the line</p>
<p>#LoadModule php5_module        libexec/apache2/libphp5.so</p>
<p>in the httpd.conf apache config (/etc/apache2/httpd.conf) so it includes the php5 module that comes with the OS.</p>
<p>Make sure your extension_dir in php.ini points to /usr/lib/php5/extensions/no-debug-non-zts-20060613/ or go nuts and do your own extension directory. </p>
<h3>Debugging 64-bit</h3>
<p>This was one of the trickier things. You need to get an X-Debug extension setup. Hopefully you can just use my 64-bit extension file, and put that in your extensions directory (/usr/lib/php5/extensions/no-debug-non-zts-20060613/). Then add the zend_extension directive to the php.ini, along with the X-Debug settings, pointing to your (local or remote) host. In your php.ini:</p>
<div class="text-box">
<pre>
(left bracket)xdebug(right bracket)
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=natest.crimereports.com  ; if debugging on remote server, put client IP here
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
</pre>
</div>
<p><a title="xdebug extension" href="http://n8williams.com/misc/xdebug.so" target="_self">xbedug.so</a> (specific to 64-bit Mac OS X)</p>
<p>If that short version doesn&#8217;t work, you need to compile a 64-bit extension from the xdebug source, which was sort of tricky. You&#8217;ll need to get a compiler installed on your Mac OS if you haven&#8217;t got the right developer tools installed (XCode from the install disk or mac;s website), and then follow the instructions in this article.</p>
<p><a title="64-bit XDebug driver for php on Mac OS X 10.5" href="http://www.vividreflection.com/blog/installing-xdebug-on-macosx/" target="_blank">http://www.vividreflection.com/blog/installing-xdebug-on-macosx/</a><br />
<a title="64-bit XDebug driver for php on Mac OS X 10.5" href="http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105" target="_blank">http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105</a></p>
<h2>Installing MySQL</h2>
<p>Use the installer from MySQL&#8217;s site, and it goes pretty seamlessly. You may have to edit the php.ini to use the mysql server.</p>
<p>The tricky part of this is if you use a framework, or your code uses the pdo database interface. Again, you can try my 64-bit version, or compile your own pdo_mysql extension. Enable the extension in the php.ini by addin gthe line extension=pdo_mysql.so</p>
<p><a title="pdo_mysql extension" href="http://n8williams.com/misc/pdo_mysql.so" target="_self">pdo_mysql.so</a> (specific to 64-bit Mac OS X)</p>
<p><a title="pdo_mysql 64-bit for Mac OS X 10.5" href="http://www.hoboes.com/Mimsy/hacks/adding-pdo-mysql-mac-os-x-leopard-server/" target="_blank">http://www.hoboes.com/Mimsy/hacks/adding-pdo-mysql-mac-os-x-leopard-server/</a><br />
<a title="pdo_mysql issues" href="http://www.spiration.co.uk/post/1332/install%20PDO_MYSQL%20-%20mysql_config%20and%20header%20files%20problem" target="_blank">http://www.spiration.co.uk/post/1332/install%20PDO_MYSQL%20-%20mysql_config%20and%20header%20files%20problem</a></p>
<h2>Eclipse</h2>
<p>So there is a Cacao version that is 64-bit. I guess the difference here, as I&#8217;ve read online, is that the Carbon version is more stable, but also legacy and in the future will be deprecated soon.</p>
<p>I love using the update site to get plugins. That seemed to work best for PDT php, aptana, SVN (subclipse), and various editors, etc.</p>
<h2>Flex</h2>
<p>I sort of copped-out here when I learned the 64-bit version of eclipse doesn&#8217;t work well with Flex-Builder as an Eclipse plugin. I&#8217;m planning on installing the stand-alone version of flex builder, and using that separately (a little but resource wasteful, but far more convenient).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prepared statement errors with PHP 5.3 and mysqli. call_user_func_array returns null. Type error?</title>
		<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null</link>
		<comments>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null#comments</comments>
		<pubDate>Thu, 10 Sep 2009 23:04:36 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=144</guid>
		<description><![CDATA[Prepared statements using mysqli seems to be having issues with PHP 5.3. I kept getting null from a prepared statement command that worked fine in PHP 5.2, namely, the mysqli_stmt_bind_param
Null means that the array you passed didn&#8217;t match the function signature.
The following worked in php 5.2, but when I updated my Mac to Snow Leopard [...]]]></description>
			<content:encoded><![CDATA[<p>Prepared statements using mysqli seems to be having issues with PHP 5.3. I kept getting null from a prepared statement command that worked fine in PHP 5.2, namely, the mysqli_stmt_bind_param</p>
<p>Null means that the array you passed didn&#8217;t match the function signature.</p>
<p>The following worked in php 5.2, but when I updated my Mac to Snow Leopard (PHP 5.3 included) the following function stopped working</p>
<p><strong>call_user_func_array(&#8217;mysqli_stmt_bind_param&#8217;, array($stmt,&#8217;isis&#8217;,$args));</strong></p>
<p>I kept getting a null return value (note &#8211; different than false). See bottom of the following bug:  <a title="http://bugs.php.net/bug.php?id=47554&amp;edit=1" href="http://bugs.php.net/bug.php?id=47554&amp;edit=1" target="_blank">http://bugs.php.net/bug.php?id=47554&amp;edit=1</a></p>
<pre>"Returns the function result, NULL for an invalid callback, and FALSE
for all other errors."</pre>
<p>Toying with the array (translates to method signature of the callback function) passed to call_user_func_array was key. After much head banging (on desk) and much head banging (to music) I found that the following made my one specific test query work:</p>
<p><strong>call_user_func_array(&#8217;mysqli_stmt_bind_param&#8217;, array($stmt,&#8217;isis&#8217;,(int) $args[2],(string) $args[3],(int) $args[4],(string) $args[5]));</strong></p>
<p>I wonder if the library that mysqli uses is in c (so that mysqli_stmt_bind_param is eventually run at a level where typing needs to be determined), and is requiring typed values that the php is screwing up somewhere in the translation. Or on the mysqli level. And I wonder what other explanations there could be for this behavior.</p>
<p>Usually when code is this buggy it is a developer&#8217;s coding errors, but someday I hope to run into a bug that isn&#8217;t my fault. On second thought, finding a bug in your development language probably causes a lot more pain in trying to figure it out, so I&#8217;m not sure that would be much of an accomplishment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

