<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Technical tidbits</title>
	<atom:link href="http://lightman76.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lightman76.wordpress.com</link>
	<description>Coding, hardware, Linux, etc.</description>
	<lastBuildDate>Mon, 20 Oct 2008 08:15:59 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='lightman76.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/191b8a04ea59dbc28e5cb5979213fe7c?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Technical tidbits</title>
		<link>http://lightman76.wordpress.com</link>
	</image>
			<item>
		<title>Internet Explorer Plugins and Vista</title>
		<link>http://lightman76.wordpress.com/2008/10/20/internet-explorer-plugins-and-vista/</link>
		<comments>http://lightman76.wordpress.com/2008/10/20/internet-explorer-plugins-and-vista/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 08:14:56 +0000</pubDate>
		<dc:creator>lightman76</dc:creator>
				<category><![CDATA[Internet Explorer Plugin]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[vista]]></category>

		<guid isPermaLink="false">http://lightman76.wordpress.com/?p=8</guid>
		<description><![CDATA[So I&#8217;ve recently got a new machine that came pre installed with Windows Vista.  And now I&#8217;ve got the fun task of trying to make everything work again with my plugin  
 
There are a number of places where I&#8217;ve found some good info on this, which I will enumerate here for your and my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=8&subd=lightman76&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So I&#8217;ve recently got a new machine that came pre installed with Windows Vista.  And now I&#8217;ve got the fun task of trying to make everything work again with my plugin <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p> </p>
<p>There are a number of places where I&#8217;ve found some good info on this, which I will enumerate here for your and my benefit.</p>
<p><a href="http://www.codeproject.com/KB/vista-security/PMSurvivalGuide.aspx">http://www.codeproject.com/KB/vista-security/PMSurvivalGuide.aspx</a> - A Developer&#8217;s Survival Guide to IE Protected Mode</p>
<p><a href="http://technet.microsoft.com/en-us/magazine/cc138019.aspx">http://technet.microsoft.com/en-us/magazine/cc138019.aspx</a> - Inside Windows Vista User Account Control</p>
<p><a title="http://msdn.microsoft.com/en-us/library/bb250462.aspx" href="http://msdn.microsoft.com/en-us/library/bb250462.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/bb250462.aspx</a> - Understanding and Working in Protected Mode Internet Explorer</p>
<p><a href="http://blogs.msdn.com/ie/archive/2006/02/09/528963.aspx">http://blogs.msdn.com/ie/archive/2006/02/09/528963.aspx</a> - Protected Mode in Vista IE7</p>
<div>A couple of key things if you&#8217;re relying on the compatibility shims: (described in a little more detail in the 4th link)</div>
<div>Registry Accesses (to HKCU software) are moved to</div>
<div>HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\InternetRegistry\REGISTRY\USER\[User security identifier - SID]\Software\[my key]</div>
<div>File accesses (to acceptable locations) are moved to </div>
<div> <span>%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\{system drive letter}\Users\{username}</span></div>
<div>I hope to update more this as I dive further into updating my plugin and making it work in both XP and Vista.</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lightman76.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lightman76.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lightman76.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lightman76.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lightman76.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lightman76.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lightman76.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lightman76.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lightman76.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lightman76.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=8&subd=lightman76&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lightman76.wordpress.com/2008/10/20/internet-explorer-plugins-and-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a1628116922e452363be059286c5a5c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">lightman76</media:title>
		</media:content>
	</item>
		<item>
		<title>Improving AJAX performance of large tables of results&#8230;</title>
		<link>http://lightman76.wordpress.com/2007/11/06/improving-ajax-performance-of-large-tables-of-results/</link>
		<comments>http://lightman76.wordpress.com/2007/11/06/improving-ajax-performance-of-large-tables-of-results/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 01:40:01 +0000</pubDate>
		<dc:creator>lightman76</dc:creator>
				<category><![CDATA[AJAX]]></category>

		<guid isPermaLink="false">http://lightman76.wordpress.com/2007/11/06/improving-ajax-performance-of-large-tables-of-results/</guid>
		<description><![CDATA[I&#8217;ve been writing an AJAX site.  I&#8217;ve got listings of results (40 per page) that I dynamically pull in from the server and allow the user to index through.   Everything worked beautifully in firefox (rendered the new recordset in the page in less than 500ms).  IE 6 however CHOKED bigtime &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=7&subd=lightman76&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been writing an AJAX site.  I&#8217;ve got listings of results (40 per page) that I dynamically pull in from the server and allow the user to index through.   Everything worked beautifully in firefox (rendered the new recordset in the page in less than 500ms).  IE 6 however CHOKED bigtime &#8211; it took around 3-4 seconds to render the first &#8220;page&#8221; of results.  And as each successive page of results was rendered (replacing the previous one) it progressively slowed, to the point that after the 4th page, it was taking 10+ seconds to render.  I was just removing and dynamically adding rows to a table through the DOM.</p>
<p>First thing I found was <a href="http://www.oreillynet.com/pub/a/javascript/2003/05/06/dannygoodman.html?page=1" title="Dynamic HTML Table generation performance" target="_blank">this.</a>  That helped some.   The next problem I looked into was using the prototype js libraries .each iterator.  It&#8217;s really handy, but IE 6 performs very badly with it.  So I replaced all of my loops over lists that could be long with standard for loops.</p>
<p>The next problem I found was that I was extending all of the elements I was using with the prototype js library to set styles and classes on them, and observing events.  (Each entry in the recordset has several onclick events to deal with labels, etc).  It turns out that IE majorly chokes on this.  One of IE 6&#8217;s big problems is garbage collecting events.  Prototype has done some work to help it with this.  On page unload, they&#8217;ll automatically remove all event handlers (otherwise they permanently leak).  The problem with my site was that I&#8217;m creating a bunch of events, and my page never unloads because I&#8217;m dynamically changing the content.  So these event handlers just kept piling up.  I can&#8217;t just call the prototype Event.unloadCache because I have other events on the page I want to keep &#8211; I&#8217;m just changing the main content in a table.</p>
<p>To work around this I ended up creating my own analogies to several of the prototype event functions.  The Event.observe equivalent takes an extra (optional) parameter which specifies the name of an event group.  Rather than just keeping a list of all events registered, I categorize them by this event group name so I can call the unloadCache equivalent method with this and ONLY unload the events from a given group.  If no event group is specified to the unloadCache method, I remove all events (for instance, on the page unload event).</p>
<p>With these changes I was able to get get IE 6 consistently rendering the content in the page in around 500ms.  Haven&#8217;t had a chance to note the performance numbers in IE 7 yet.</p>
<p>Also of interest if you&#8217;re looking into javascript performance is this simple javascript <a href="http://remysharp.com/time.js" title="Javascript performance instrumentation helper" target="_blank">performance instrumentation helper</a>.  Nothing fancy, just a quick way to time various aspects of your app crossbrowser.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lightman76.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lightman76.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lightman76.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lightman76.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lightman76.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lightman76.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lightman76.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lightman76.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lightman76.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lightman76.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lightman76.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lightman76.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=7&subd=lightman76&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lightman76.wordpress.com/2007/11/06/improving-ajax-performance-of-large-tables-of-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a1628116922e452363be059286c5a5c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">lightman76</media:title>
		</media:content>
	</item>
		<item>
		<title>IE BHO: Including local images in a remote page&#8230;</title>
		<link>http://lightman76.wordpress.com/2007/10/01/ie-bho-including-local-images-in-a-remote-page/</link>
		<comments>http://lightman76.wordpress.com/2007/10/01/ie-bho-including-local-images-in-a-remote-page/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 23:13:15 +0000</pubDate>
		<dc:creator>lightman76</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lightman76.wordpress.com/2007/10/01/ie-bho-including-local-images-in-a-remote-page/</guid>
		<description><![CDATA[I&#8217;ve been writing an IE plugin (or BHO) and ran across a problem when I tested it under IE 7.  When I included images off of the local harddrive, most didn&#8217;t show up under IE7 (but worked fine under IE 6).  However, I noticed that one image I was using did work.
The difference was that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=6&subd=lightman76&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been writing an IE plugin (or BHO) and ran across a problem when I tested it under IE 7.  When I included images off of the local harddrive, most didn&#8217;t show up under IE7 (but worked fine under IE 6).  However, I noticed that one image I was using did work.</p>
<p>The difference was that this image was a CSS style background.  So I was able to work around this problem by simply converting all of my images to be spans/divs with the style.backgroundImage=&#8221;url(&#8216;<em>path to local image file</em>&#8216;)&#8221;.</p>
<p>Of course the caveat is that this behavior is probably not something they intended, and may fix it at some point.  But until then, it&#8217;s an easy change (compared to using the res protocol or a custom protocol &#8211; mentioned in the <a href="http://petesearch.com/wiki/index.php/LocalImageLoading" title="BHO Wiki" target="_blank">BhoWiki</a> ) to get the job done.  Also, I&#8217;ve heard that the IE7 is slightly different under Vista as compared to XP.  I have been testing IE 7 under XP using the Microsoft Virtual PC testing images they have freely available for download (Info about it <a href="http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx" target="_blank">here</a> and download page actually has XP with IE6 (if you have upgraded to IE7 already) and XP with IE7 (in case you still are running IE6 or Vista).  The article links to an older version of Microsoft Virtual PC, but you can use the latest one <a href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx" title="Microsoft Virtual PC download page" target="_blank">here</a> (I&#8217;ve noticed it fixed some issues I saw under the old version).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lightman76.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lightman76.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lightman76.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lightman76.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lightman76.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lightman76.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lightman76.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lightman76.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lightman76.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lightman76.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lightman76.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lightman76.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=6&subd=lightman76&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lightman76.wordpress.com/2007/10/01/ie-bho-including-local-images-in-a-remote-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a1628116922e452363be059286c5a5c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">lightman76</media:title>
		</media:content>
	</item>
		<item>
		<title>Running Ruby on Rails with mod_fcgid and Apache</title>
		<link>http://lightman76.wordpress.com/2007/06/15/running-ruby-on-rails-with-mod_fcgid-and-apache/</link>
		<comments>http://lightman76.wordpress.com/2007/06/15/running-ruby-on-rails-with-mod_fcgid-and-apache/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 00:02:29 +0000</pubDate>
		<dc:creator>lightman76</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[mod_fcgid]]></category>

		<guid isPermaLink="false">http://lightman76.wordpress.com/2007/06/15/running-ruby-on-rails-with-mod_fcgid-and-apache/</guid>
		<description><![CDATA[I had a particularly painful experience trying to get Rails and FCGID to play nicely.  It seemed most of what I found was for older versions of rails working with FastCGI.
So here&#8217;s my pass at getting it setup under a Linux environment
First off, I&#8217;m using

Apache 2.0.52
mod_fcgid version 1.10
Ruby 1.8.4
Rails 1.2.3

Assuming that this is more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=5&subd=lightman76&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had a particularly painful experience trying to get Rails and FCGID to play nicely.  It seemed most of what I found was for older versions of rails working with FastCGI.</p>
<p>So here&#8217;s my pass at getting it setup under a Linux environment</p>
<p>First off, I&#8217;m using</p>
<ul>
<li>Apache 2.0.52</li>
<li>mod_fcgid version 1.10</li>
<li>Ruby 1.8.4</li>
<li>Rails 1.2.3</li>
</ul>
<p>Assuming that this is more of a production type setup, put your entire rails project in a directory (assuming you want this to be separate from your development location).  I&#8217;ll refer to this directory as [rails app].   [rails app] should be the directory that contains the <strong>public</strong>, <strong>app</strong>, <strong>config</strong>, etc directories.</p>
<p>Now, edit your config/database.yml file and make sure that the production database configuration is correct.</p>
<p>I don&#8217;t believe that any extra libraries are needed to make rails work with FCGI &#8211; I believe they are all built-in now.</p>
<p>Next, in the public directory, you&#8217;ll need to edit the .htaccess file.  By default rails starts this file with</p>
<pre># General Apache options</pre>
<pre>AddHandler fastcgi-script .fcgi

AddHandler cgi-script .cgiOptions +FollowSymLinks +ExecCGI</pre>
<p>You&#8217;ll want to change this part to read</p>
<pre># General Apache options

AddHandler fcgid-script .fcgi

Options +FollowSymLinks +ExecCGI</pre>
<p>so that .fcgi is handled by fcgid instead of fastcgi.  I removed the .cgi entry just because I wanted to ensure I was getting it working via the mechanism I intended. Also note the 500 error message at the bottom of the .htaccess file &#8211; if you&#8217;ve gotten Apache configured to get to this directory correctly and something else is going wrong, this is the error message you&#8217;ll see.  If you&#8217;re trying to debug, it can be useful to change this to ensure you&#8217;re really working with what you think you are.</p>
<p>Next, and <u><strong>VERY</strong></u> important (no &#8211; I didn&#8217;t lose 5 hours of my life on this&#8230;). You must change the ownership of ALL the files (or at least some critical number of them, I never figured out which magical files mattered) to the user that Apache will try to run them as.  This may be apache, or some other user if you have, for instance ,an SuexecUserGroup directive.  Ensure that <strong>dispatch.fcgi</strong> has read/execute permissions Also, the rails apps <strong>log </strong>and <strong>tmp </strong>directories must be writable by the user rails is being run as.  If the user is incorrect, fcgid won&#8217;t run the files, and you&#8217;ll get the error message from your .htaccess file, and very unhelpful error_log entries.</p>
<p>One other important thing to note.  If any of your Ruby code writes to the console with puts or equivalent, this breaks the rails integration with mod_fcgid.  If you wanted to be really sneaky, you could probably do something clever in the dispatch.fcgi file and override the common console output functions to write to a log file or something, but I leave that up to you.</p>
<p>Now on the Apache end:</p>
<p>First make sure mod_fcgid is loaded.  In your httpd.conf (or in a conf.d/&#8230; config file if you prefer) you&#8217;ll need to have the following (with the correct path to your modules directory)</p>
<pre>LoadModule fcgid_module /usr/lib/httpd/modules/mod_fcgid.so
&lt;IfModule mod_fcgid.c&gt;
    AddHandler fcgid-script .fcgi .fcg .fpl
&lt;/IfModule&gt;</pre>
<pre>&lt;IfModule mod_fcgid.c&gt;
  SocketPath /var/lib/apache2/fcgid/sock
  DefaultInitEnv  HTTP_RAILS_ENV production
  IdleTimeout 600
  ProcessLifeTime 3600
  MaxProcessCount 8
  DefaultMinClassProcessCount 3
  DefaultMaxClassProcessCount 4
  IPCConnectTimeout 80
  IPCCommTimeout 48
&lt;/IfModule&gt;</pre>
<p>Note the HTTP_RAILS_ENV setting in there.  If you don&#8217;t want to run in production, you can change that here.  YOU MUST ALSO ADD the following line NEAR THE TOP of your config/environment.rb file &#8211; I put it right under the 3 commented lines already in the file.   Apparently based on this <a href="http://forums.theplanet.com/index.php?s=4a7973506ddcec53bf5bcac1fe7919f2&amp;showtopic=88332&amp;pid=579288&amp;st=0&amp;#entry579288" title="RAILS_ENV and mod_fcgid" target="_blank">article</a> the mod_fcgid has limitations on the environment variables it can set (looks like they have to start with HTTP_??).  The following line simply sets the RAILS_ENV to the value of HTTP_RAILS_ENV unless it&#8217;s already been set.</p>
<pre># Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'

ENV['RAILS_ENV'] ||= ENV['HTTP_RAILS_ENV']</pre>
<p>This line must be before any of the rest of the rails environment gets loaded or else the environment will initialize in development mode</p>
<p>To actually map in your rails application into Apache,  I saw two ways, but I&#8217;ve only tried one.  I had success with creating a symbolic link in my web servers root directory to the [rails app]/public directory (this of course requires that you have Options FollowSymLinks set).  This puts the rails app at http://your site.com/[linkname]   The other would be to have inside your VirtualHost directive an Alias directive such as Alias /myRailsApp [rails app]/public .</p>
<p>For either method I believe you&#8217;ll need an entry in the VirtualHost directive of your Apache configuration with something like the following</p>
<pre>  &lt;Directory [rails app]/public&gt;
    Options Indexes FollowSymLinks ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
  &lt;/Directory&gt;</pre>
<p>Now, if I haven&#8217;t forgotten anything, if you restart Apache, you should be able to access your rails app.  Note that this puts your rails application under a subdirectory on the webserver.   I haven&#8217;t tried to place a rails app as the root of the server, but hopefully this will help you get started.</p>
<p>Note that once you actually get into the rails world, errors, etc will be logged in [rails app]/log.  If you didn&#8217;t make it into rails, check the apache error_log (note that your sites error log may not be in /var/log/httpd/error_log or the like if there a specific CustomLog directive for the VirtualHost).</p>
<p>Good luck!</p>
<p>Updates</p>
<p>8/16/2007: Discovered a problem with using DefaultInitEnv of RAILS_ENV and the need to use the HTTP_RAILS_ENV setting</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lightman76.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lightman76.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lightman76.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lightman76.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lightman76.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lightman76.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lightman76.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lightman76.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lightman76.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lightman76.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lightman76.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lightman76.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=5&subd=lightman76&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lightman76.wordpress.com/2007/06/15/running-ruby-on-rails-with-mod_fcgid-and-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a1628116922e452363be059286c5a5c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">lightman76</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a cookie within a C# plugin in Internet Explorer</title>
		<link>http://lightman76.wordpress.com/2007/06/05/creating-a-cookie-within-a-c-plugin-in-internet-explorer/</link>
		<comments>http://lightman76.wordpress.com/2007/06/05/creating-a-cookie-within-a-c-plugin-in-internet-explorer/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 05:57:50 +0000</pubDate>
		<dc:creator>lightman76</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Internet Explorer Plugin]]></category>

		<guid isPermaLink="false">http://lightman76.wordpress.com/2007/06/05/creating-a-cookie-within-a-c-plugin-in-internet-explorer/</guid>
		<description><![CDATA[I had the need to create a cookie from within my IE plug-in.  I create a session cookie when the browser is loaded so that when a user visits my site, I know what version of the plug-in is installed.  There appears to be no direct C# API to do this (based on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=4&subd=lightman76&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had the need to create a cookie from within my IE plug-in.  I create a session cookie when the browser is loaded so that when a user visits my site, I know what version of the plug-in is installed.  There appears to be no direct C# API to do this (based on a few google searches).  I did find from these searches that there is a method called InternetSetCookie in wininet.dll</p>
<p>For those who don&#8217;t regularly have to jump out into the COM world, the code to do this can be a bit of a pain to track down, so here&#8217;s the C# import of the method as well as a nice wrapper that will throw an exception if the call is not successful.</p>
<pre>
        [DllImport("wininet.dll",EntryPoint="InternetSetCookie",ExactSpelling=false,CharSet=CharSet.Unicode,SetLastError=true)]
        static extern bool InternetSetCookie(string url, string cookieName, string cookieData);

        public static void SetCookie(string siteUrl, string cookieName, string cookieData)
        {
            if (!InternetSetCookie(siteUrl, cookieName, cookieData))
            {
                throw new Exception("Exception setting cookie: Win32 Error code="+Marshal.GetLastWin32Error());
            }
        }
</pre>
<p>Note that siteUrl must be in the form of &#8220;http://www.abc.com&#8221; and cannot include a port specification.</p>
<p>For reference the MSDN entry for InternetSetCookie is <a href="http://msdn2.microsoft.com/en-US/library/aa385107.aspx" title="InternetSetCookie on MSDN" target="_blank">here.</a></p>
<p>More details on how to specify the expiration dates of the cookies is <a href="http://msdn2.microsoft.com/en-US/library/aa385326.aspx" title="Http Cookies on MSDN" target="_blank">here.</a></p>
<p>And in case you want even more info on cookies in IE, this page describes each of the possible cookie fields <a href="http://msdn2.microsoft.com/en-US/library/aa384321.aspx" title="More on HTTP Cookies on MSDN" target="_blank">in detail.</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lightman76.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lightman76.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lightman76.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lightman76.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lightman76.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lightman76.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lightman76.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lightman76.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lightman76.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lightman76.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lightman76.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lightman76.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=4&subd=lightman76&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lightman76.wordpress.com/2007/06/05/creating-a-cookie-within-a-c-plugin-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a1628116922e452363be059286c5a5c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">lightman76</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro</title>
		<link>http://lightman76.wordpress.com/2007/06/05/intro/</link>
		<comments>http://lightman76.wordpress.com/2007/06/05/intro/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 05:29:10 +0000</pubDate>
		<dc:creator>lightman76</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lightman76.wordpress.com/2007/06/05/intro/</guid>
		<description><![CDATA[Occasionally when coding, I run across something I think is particularly spiffy, or spectacularly painful.  Especially when I run across the painful things that I haven&#8217;t had much luck searching for solutions, I thought it would be a grand idea to create a blog of my own to detail these in for future use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=3&subd=lightman76&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Occasionally when coding, I run across something I think is particularly spiffy, or spectacularly painful.  Especially when I run across the painful things that I haven&#8217;t had much luck searching for solutions, I thought it would be a grand idea to create a blog of my own to detail these in for future use by myself and others, as many times when I do find a good solution, it is in this type of forum.</p>
<p>Happy coding!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/lightman76.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/lightman76.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lightman76.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lightman76.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lightman76.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lightman76.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lightman76.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lightman76.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lightman76.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lightman76.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lightman76.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lightman76.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lightman76.wordpress.com&blog=1196900&post=3&subd=lightman76&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lightman76.wordpress.com/2007/06/05/intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a1628116922e452363be059286c5a5c?s=96&#38;d=identicon" medium="image">
			<media:title type="html">lightman76</media:title>
		</media:content>
	</item>
	</channel>
</rss>