<?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>Mark Foster&#039;s Blog &#187; Web Development</title>
	<atom:link href="http://www.mkfoster.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mkfoster.com</link>
	<description>Misadventures in Technology</description>
	<lastBuildDate>Thu, 02 Feb 2012 03:41:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP/Apache running on Linux won&#8217;t connect to a PostgreSQL server</title>
		<link>http://www.mkfoster.com/2012/01/25/php-apache-running-on-linux-wont-connect-to-a-postgresql-server/</link>
		<comments>http://www.mkfoster.com/2012/01/25/php-apache-running-on-linux-wont-connect-to-a-postgresql-server/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 21:51:06 +0000</pubDate>
		<dc:creator>mfoster</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[LinkedIn]]></category>

		<guid isPermaLink="false">http://www.mkfoster.com/?p=1018</guid>
		<description><![CDATA[SELinux will block PHP/Apache from connecting to PostgreSQL (and probably any other DB) by default on some Linux distributions. If you are trying to get PHP to connect to a PostreSQL DB on a linux box for the first time and you are sure your pg_hba.conf on the target box is setup correctly then try [...]]]></description>
			<content:encoded><![CDATA[<p>SELinux will block PHP/Apache from connecting to PostgreSQL (and probably any other DB) by default on some Linux distributions.  If you are trying to get PHP to connect to a PostreSQL DB on a linux box for the first time and you are sure your pg_hba.conf on the target box is setup correctly then try this:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">setsebool -P httpd_can_network_connect 1</pre></div></div>

<p>This should configure SELinux to allow Apache/PHP to connect to other hosts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mkfoster.com/2012/01/25/php-apache-running-on-linux-wont-connect-to-a-postgresql-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TestMyWireless.com</title>
		<link>http://www.mkfoster.com/2011/04/24/testmywireless-com/</link>
		<comments>http://www.mkfoster.com/2011/04/24/testmywireless-com/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 03:55:33 +0000</pubDate>
		<dc:creator>mfoster</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mkfoster.com/?p=1003</guid>
		<description><![CDATA[I just finished testmywireless.com. It is a mobile-targeted website that allows you to test your wireless bandwidth on mobile phones or tablets that do not have Flash support (I.e. iPhone) without installing an app. It is intended to be used as a comparison shopping tool for folks in the market for smartphones and tablets. To [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished <a href="http://testmywireless.com">testmywireless.com</a>.  It is a mobile-targeted website that allows you to test your wireless bandwidth on mobile phones or tablets that do not have Flash support (I.e. iPhone) without installing an app.  It is intended to be used as a comparison shopping tool for folks in the market for smartphones and tablets.  To test broadband performance, disable Wi-Fi on the device, open a browser and go to <a href="http://testmywireless.com">testmywireless.com</a>.  Press &#8220;Test My Connection&#8221; to test the device&#8217;s broadband connection performance.</p>
<p>The site also allows you test the browser&#8217;s support for modern web standards and search for service providers near your location.  The service provider search uses your current GPS location (with your permission) and shows each provider&#8217;s advertised upload and download speeds which you can compare with your connection test results.  You can also search by postal code or city, state.  The <a href="http://broadbandmap.gov/developer">FCC/NTIA National BroadBand Map API</a> is used to find service providers and their advertised bandwidth speeds.</p>
<p>It was a good little project to tinker with jQuery Mobile, integrate with a couple API&#8217;s, and learn more about JavaScript Asynchronous programming in general.  It is not nearly as flashy as some of the existing bandwidth test tools and there are still some quirks and bugs to work out but it seems work pretty well for the most part.  If you have a chance to <a href="http://testmywireless.com">try the site out</a>, I would be interested in your feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mkfoster.com/2011/04/24/testmywireless-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>National Broadband Map Review</title>
		<link>http://www.mkfoster.com/2011/02/24/national-broadband-map-review/</link>
		<comments>http://www.mkfoster.com/2011/02/24/national-broadband-map-review/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 04:18:48 +0000</pubDate>
		<dc:creator>mfoster</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[4stars]]></category>
		<category><![CDATA[LinkedIn]]></category>

		<guid isPermaLink="false">http://www.mkfoster.com/?p=948</guid>
		<description><![CDATA[The National Telecommunications and Information Administration (NTIA) in collaboration with the FCC has published a series of broadband maps on a new site called National Broadband Map (NBM). These maps show what broadband services are available throughout the United States as well as other interesting broadband data. Hit this link and click the &#8220;Explorer the [...]]]></description>
			<content:encoded><![CDATA[<p>The National Telecommunications and Information Administration (NTIA) in collaboration with the FCC has <a href="http://www.broadbandmap.gov/">published a series of broadband maps on a new site called National Broadband Map (NBM)</a>.  <a href="http://www.broadbandmap.gov/">These maps</a> show what broadband services are available throughout the United States as well as other interesting broadband data.</p>
<p><a href="http://www.mkfoster.com/2011/02/24/national-broadband-map-review/nbm_screenshot/" rel="attachment wp-att-957"><img src="http://www.mkfoster.com/wp-content/uploads/2011/02/nbm_screenshot-530x303.jpg" alt="national broadband map screenshot" title="nbm_screenshot" width="530" height="303" class="alignnone size-medium wp-image-957" /></a></p>
<p>Hit <a href="http://www.broadbandmap.gov/">this link</a> and click the &#8220;Explorer the Map&#8221; option on <a href="http://www.broadbandmap.gov/">their main page</a> to see a map of the US with shaded areas where selected broadband services are available.  You can click different selections above the map to toggle the various broadband technologies.   To see other maps such as advertised versus actual broadband speeds click on the &#8220;Show Gallery&#8221; option in the lower right hand corner.</p>
<p>Rochester, NY does pretty well on advertised versus actual although there a few slower than advertised points here and there.  Upload performance data is also available.  Usually the cable and DSL providers don&#8217;t brag much about upload performance likely because in most cases it is lousy compared to download performance.  I think upload performance will become more important to the typical internet user than it as in the past now that people are sharing their pictures and video online.</p>
<p>The <a href="http://www.broadbandmap.gov/">NBM site</a> use a <a href="http://www.broadbandmap.gov/about/third-party-sources">variety of open source technologies</a> including:</p>
<ul>
<li><a href="http://jquery.com/">JQuery</a> &#8211; My favorite JavaScript library.</li>
<li><a href="http://www.modernizr.com/">Modernizr</a> &#8211; A JavaScript library to detect browser capabilities.</li>
<li><a href="http://openlayers.org/">OpenLayers</a> &#8211; Provides a JavaScript API to display <a href="http://www.opengeospatial.org/standards/wfs">WFS</a> and <a href="http://www.opengeospatial.org/standards/wms">WMS</a> <a href="http://en.wikipedia.org/wiki/Geographic_information_system">GIS</a> layers.</li>
<li><a href="http://geoserver.org">GeoServer</a> &#8211; A Java based server software that provides <a href="http://www.opengeospatial.org/standards/wfs">WFS</a> and <a href="http://www.opengeospatial.org/standards/wms">WMS</a> services.</li>
</ul>
<p>What is particularly interesting about the site is the <a href="http://www.broadbandmap.gov/developer">developer resources</a>.  They provide a series of API&#8217;s you can call from your own web applications to use their data.  Output formats include XML, JSON, and <a href="http://en.wikipedia.org/wiki/JSON">JSONP</a> implementations.  If you want to use the data locally without the APIs you can <a href="http://www.broadbandmap.gov/data-download">download it</a>.</p>
<p>I do have a couple criticisms regarding the maps and ironically, they are bandwidth related.  The first is that there are too many tiles returned when viewing the default map of the US.  I noticed the map was a little slow to fill in.  When I enabled Firebug and clicked on the &#8220;Explore the Map&#8221; option off the main page, over 500 tiles were pulled down.  In fact, Firefox/Firebug became unresponsive.  I would expect less than 30 256&#215;256 tiles need to be pulled down for a reasonably sized browser window.  I wager there is something goofy going on like a bounding box not set for the area displayed.</p>
<p>My second criticism is that the site is not using gzip to compress JavaScript files.  Modern web applications tend to lay on the JavaScript pretty heavy and this one is no exception.  OpenLayers.js is nearly 1MB all by itself.  By enabling gzip on sites with large JavaScript files you can significantly improve site performance.  This is a good topic for a future post.</p>
<p>Overall I think the <a href="http://www.broadbandmap.gov/">National Broadband Map Site</a> is an excellent resource.  It provides very useful data on broadband technologies/speeds, makes this data available via APIs or download, and also demonstrates a variety of open source web application technologies.</p>
<p>Is it worth the <a href="http://www.pcmag.com/article2/0,2817,2380525,00.asp">$20 million that contractors were paid to build the map?</a>  I would say certainly not at first glance but I would want to hear the whole story before I jump to conclusions.  I.e. how much of that $20 million was spent on actual development?  I am much more skeptical of the alleged $293 million required to collect the data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mkfoster.com/2011/02/24/national-broadband-map-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Titanium Appcelerator Quirks (Updated)</title>
		<link>http://www.mkfoster.com/2011/01/10/titanium-appcelerator-quirks/</link>
		<comments>http://www.mkfoster.com/2011/01/10/titanium-appcelerator-quirks/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 05:05:18 +0000</pubDate>
		<dc:creator>mfoster</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://www.mkfoster.com/?p=844</guid>
		<description><![CDATA[I recently started tinkering with the Appcelerator Titanium Development Platform and have run into a couple quirks. Web Inspector will not Launch If you create a Titanium project on any drive other than C:\ on a Windows system, you will not be able to launch the Web Inspector. This is a apparently a known bug [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started tinkering with the Appcelerator Titanium Development Platform and have run into a couple quirks.</p>
<h3>Web Inspector will not Launch</h3>
<p>If you create a Titanium project on any drive other than C:\ on a Windows system, you will not be able to launch the Web Inspector.  This is a apparently a <a href="https://appcelerator.lighthouseapp.com/projects/25719/tickets/299-web-inspector-sometimes-does-not-show-up-in-windows">known bug in Titanium Developer</a>.</p>
<h3>Conflicting PHP Installations</h3>
<p>If you attempt to launch a Titanium Appcelerator PHP app in Titanium Developer on a Windows system that already has a local PHP installation, you may see the following error:</p>
<div class="error">
Kroll Event Window Instance: YourApp.exe &#8211; System Error</p>
<p>The program can&#8217;t start because php_mbstring.dll is missing from your computer.  Try reinstalling the program to fix this problem.
</p></div>
<p><a href="http://www.mkfoster.com/2011/01/10/titanium-appcelerator-quirks/kroll_php_mbstring_error/" rel="attachment wp-att-848"><img src="http://www.mkfoster.com/wp-content/uploads/2011/01/kroll_php_mbstring_error.png" alt="Titanium Appcelerator php_mbstring.dll error" title="kroll_php_mbstring_error" width="496" height="171" class="alignnone size-full wp-image-848" /></a></p>
<p>Don&#8217;t bother re-installing anything.  What is likely happening is that your pre-existing PHP installation added a &#8220;PHPRC&#8221; environment variable that points to your existing PHP install folder.  I think Titanium&#8217;s command line PHP instance sees this variable and then attempts to use the php.ini file in that path.  Your existing PHP installation folder does not likely have the PHP settings and/or module paths that Titanium needs so it breaks.</p>
<p>To fix this without renaming your current PHP installation folder you can delete the &#8220;PHPRC&#8221; environment variable.  Your existing PHP installation should work fine without it because PHP will look for the php.ini file in the same folder it is running from.  To delete the &#8220;PHPRC&#8221; environment variable on Windows 7, click Windows Start, right click &#8220;Computer&#8221;, left click &#8220;Properties&#8221; -> &#8220;Advanced system settings&#8221; -> &#8220;Environment Variables&#8230;&#8221; -> select &#8220;PHPRC&#8221; under &#8220;System variables&#8221;, and then click &#8220;Delete&#8221;.</p>
<p><a href="http://www.mkfoster.com/2011/01/10/titanium-appcelerator-quirks/delete_php_rc/" rel="attachment wp-att-856"><img src="http://www.mkfoster.com/wp-content/uploads/2011/01/delete_php_rc-530x295.png" alt="how to delete the phprc environment variable" title="delete_phprc" width="530" height="295" class="alignnone size-medium wp-image-856" /></a></p>
<p>Hopefully you can now launch your Titanium application without an error and your existing PHP installation will continue to work normally.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mkfoster.com/2011/01/10/titanium-appcelerator-quirks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php-cgi.exe application error on IIS with FastCGI</title>
		<link>http://www.mkfoster.com/2010/10/11/php-cgi-exe-application-error-on-iis-with-fastcgi/</link>
		<comments>http://www.mkfoster.com/2010/10/11/php-cgi-exe-application-error-on-iis-with-fastcgi/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 17:41:29 +0000</pubDate>
		<dc:creator>mfoster</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[LinkedIn]]></category>

		<guid isPermaLink="false">http://www.markfosteronline.com/?p=786</guid>
		<description><![CDATA[I recently installed PHP 5.2.14 on a Windows 2003 machine running IIS 6 with FastCGI to do some PHP testing at home. I chose the fast CGI install and added several extensions during the install including Curl and Oracle. When I attempted pull a test page after the install completed, I saw the following php-cgi.exe [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed PHP 5.2.14 on a Windows 2003 machine running IIS 6 with FastCGI to do some PHP testing at home.  I chose the fast CGI install and added several extensions during the install including Curl and Oracle.  When I attempted pull a test page after the install completed, I saw the following php-cgi.exe application error on the Windows server&#8217;s desktop:</p>
<div class="error">
The instruction at &#8220;0x100f36ec&#8221; referenced memory at &#8220;0x000c0194&#8243;.  The memory could not be &#8220;read&#8221;.
</div>
<p>IIS sent the following error message back to the requesting browser after a couple minutes:</p>
<div class="error">
FastCGI Error<br />
The FastCGI Handler was unable to process the request.</p>
<p>Error Details:</p>
<p>    * The FastCGI process exited unexpectedly<br />
    * Error Number: -1073741819 (0xc0000005).<br />
    * Error Description: Unknown Error</p>
<p>HTTP Error 500 &#8211; Server Error.<br />
Internet Information Services (IIS)
</p></div>
<p>After some trial and error I was able to get my test page to display if I commented the &#8220;extension=php_curl.dll&#8221; and &#8220;extension=php_oci8.dll&#8221; lines in my php.ini file:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">; Local Variables:</span>
<span style="color: #666666; font-style: italic;">; tab-width: 4</span>
<span style="color: #666666; font-style: italic;">; End:</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_CURL<span style="">&#93;</span></span>
<span style="color: #666666; font-style: italic;">;extension=php_curl.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_GD2<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_gd2.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_MSQL<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_msql.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_MSSQL<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_mssql.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_MYSQL<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_mysql.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_MYSQLI<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_mysqli.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_OCI8<span style="">&#93;</span></span>
<span style="color: #666666; font-style: italic;">;extension=php_oci8.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_PDO<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_pdo.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_PGSQL<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_pgsql.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_SHMOP<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_shmop.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_SOAP<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_soap.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_SQLITE<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_sqlite.dll</span>
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>PHP_XMLRPC<span style="">&#93;</span></span>
<span style="color: #000099;">extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">php_xmlrpc.dll</span></pre></div></div>

<p>After some more trial error I was unable to get PHP to work without leaving the two lines commented.  I tried both the VC6 thread and VC6 non thread safe versions and both exhibited the same behavior.  On the <a href="http://windows.php.net/download/">PHP download page</a> there is a &#8220;Which version do I choose?&#8221; section that basically explains that I should be using the VC9 version for IIS.  Unfortunately I only saw the PHP 5.3.3 VC9 download and I wanted to test with PHP 5.2.14.</p>
<p>I downloaded PHP 5.3.3 anyway and it worked.  I guess I will be testing with PHP 5.3.3.</p>
<p>On a somewhat related note, if you are using <a href="http://www.iis.net/download/FastCGI">FastCGI with IIS</a>, you will probably want the <a href="http://windows.php.net/downloads/releases/php-5.3.3-nts-Win32-VC9-x86.msi">VC9 PHP 3.3.3 non thread safe version</a>.  <a href="http://www.iis-aid.com/articles/my_word/difference_between_php_thread_safe_and_non_thread_safe_binaries">This article explains why</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mkfoster.com/2010/10/11/php-cgi-exe-application-error-on-iis-with-fastcgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

