<?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>SIGTTOU &#187; Scripting</title>
	<atom:link href="http://sigttou.com/category/scripting/feed" rel="self" type="application/rss+xml" />
	<link>http://sigttou.com</link>
	<description>Just another background process...</description>
	<lastBuildDate>Sun, 04 Jul 2010 02:08:28 +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>Compiling Lua with Visual Studio 2010</title>
		<link>http://sigttou.com/lua-visual-studio-2010-2</link>
		<comments>http://sigttou.com/lua-visual-studio-2010-2#comments</comments>
		<pubDate>Tue, 04 May 2010 06:03:15 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=193</guid>
		<description><![CDATA[It&#8217;s not often I have to venture into the Microsoftland development environment, but when I do it always seems to take me a while to get used to their visual projects instead of good &#8216;ole Makefiles. I&#8217;ve been using Lua &#8230; <a href="http://sigttou.com/lua-visual-studio-2010-2">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not often I have to venture into the Microsoftland development environment, but when I do it always seems to take me a while to get used to their visual projects instead of good &#8216;ole Makefiles. I&#8217;ve been using Lua to extend my C and C++ apps a lot recently, so I suddenly found myself needing to include the Lua static library with a Visual Studio 2010 project.</p>
<p>There are already binary distributions out there, but I like to compile things myself, so I whipped up a Visual Studio 2010 project to compile the Lua static library (<code>lua.lib</code>) the command line interpreter (<code>lua.exe</code>) and the script compiler (<code>luac.exe</code>).</p>
<p>First things first. If you just want a zip file with those three binary files (the library is Visual Studio 2010 compatible), look no further:</p>
<ul>
<li><a href="http://sigttou.com/files/lua-5.1.4-bin-vs2010.zip">Lua 5.1.4 binaries compiled with VS 2010</a> (<code>lua</code>, <code>luac</code>, <code>lua.lib</code>, and necessary headers)</li>
</ul>
<p>If you want to build Lua 5.1.4 yourself (like me) just grab the most recent copy of the 5.1.4 source code from the <a href="http://www.lua.org">Lua website</a>. Next, grab these Visual Studio 2010 project files and solution file:</p>
<ul>
<li><a href="http://sigttou.com/files/lua-5.1.4-proj-vs2010.zip">Lua 5.1.4 Visual Studio 2010 projects</a> (to build the binaries yourself)</li>
</ul>
<p>To use the project files, just unzip them into the root directory of your Lua source files (where the <code>README</code>, <code>INSTALL</code>, and <code>COPYRIGHT</code> files are). Then, load up <code>lua-vs2010.sln</code> in Visual Studio 2010. You should see three projects. The first, <code>lualib</code> will build the static library under <code>lib/lua.lib</code>. The second and third, <code>lua</code> and <code>luac</code> will build the Lua interpreter and compiler under <code>bin/lua.exe</code> and <code>bin/luac.exe</code>.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/lua-visual-studio-2010-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SSL detection by PHP scripts run through FastCGI on nginx</title>
		<link>http://sigttou.com/ssl-php-fastcgi-nginx</link>
		<comments>http://sigttou.com/ssl-php-fastcgi-nginx#comments</comments>
		<pubDate>Sat, 04 Jul 2009 00:53:59 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=66</guid>
		<description><![CDATA[How&#8217;s that title for acronym soup? I ran across this issue when playing around with nginx. I was trying to set up phpMyAdmin for SQL administration, but ran into a rather peculiar issue. To explain the problem, let me give &#8230; <a href="http://sigttou.com/ssl-php-fastcgi-nginx">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>How&#8217;s that title for acronym soup?</p>
<p>I ran across this issue when playing around with <a href="http://wiki.nginx.org">nginx</a>. I was trying to set up <a href="http://www.phpmyadmin.net">phpMyAdmin</a> for SQL administration, but ran into a rather peculiar issue. To explain the problem, let me give you some context.</p>
<p>I&#8217;m running nginx only on port 443, using SSL for everything. As I&#8217;m going through the setup for phpMyAdmin, imagine my surprise when it alerts me that I&#8217;m not using an SSL connection. In fact, it&#8217;s impossible for me <strong>not</strong> to use SSL, because there&#8217;s no regular HTTP server running on port 80. I continued with the setup anyway, checking the ForceSSL option which requires all phpMyAdmin requests to be done over SSL. When I finished installing it and tried to log in, I got a Firefox error that it was stuck in a redirect loop.</p>
<p>Much Google searching later, I still couldn&#8217;t find the problem. This was when I remembered that PHP is configured differently on nginx that is typically done with Apache. With Apache, many people use the mod_php module that compiles PHP support directly into the server. With nginx, you generally process PHP requests using FastCGI.</p>
<p>I wondered if perhaps the fact that the connection was taking place over SSL wasn&#8217;t being passed through to the FastCGI process. If that was the case, the phpMyAdmin setup script wouldn&#8217;t know it was being invoked over HTTPS, and when you tried to log in it would try to forward you to the HTTPS url, which is the same page you had just requested. That would push you into an infite redirect loop.</p>
<p>In fact, that&#8217;s exactly what was happening. You can fix this with a simple addition to your nginx.conf file:</p>
<pre>server {
    listen 443;
    ... more config here, include SSL ...
    location ~ \.php$ {
        ... FastCGI config here ...
        fastcgi_param HTTPS on;
    }
}</pre>
<p>That <code>fastcgi_param HTTPS on;</code> line does the trick. Now the PHP script knows it&#8217;s being invoked over SSL and doesn&#8217;t try to infinitely redirect you. Awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/ssl-php-fastcgi-nginx/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
