<?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>Doug's Blog &#187; Websites</title>
	<atom:link href="http://blog.dougco.com/category/websites/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dougco.com</link>
	<description>Handily dispensing information to .00000001% of the world's population</description>
	<lastBuildDate>Mon, 28 Nov 2011 18:22:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Running root commands in PHP via Apache</title>
		<link>http://blog.dougco.com/websites/running-root-commands-in-php-via-apache/</link>
		<comments>http://blog.dougco.com/websites/running-root-commands-in-php-via-apache/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 16:19:57 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[shell_exec]]></category>
		<category><![CDATA[sudoers]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=144</guid>
		<description><![CDATA[I have a web application that needs to perform shells commands as root within a PHP function, and you would think that would be pretty straight forward&#8230; but it did take my a few googles to get all the details, so here are my handy notes on it. This is on a Linux system running [...]]]></description>
			<content:encoded><![CDATA[<p>I have a web application that needs to perform shells commands as root within a PHP function, and you would think that would be pretty straight forward&#8230; but it did take my a few googles to get all the details, so here are my handy notes on it. This is on a Linux system running Apache, and we&#8217;ll be using &#8220;sudo&#8221; within &#8220;shell_exec&#8221; to run the commands.</p>
<p>The main thing is to edit the /etc/sudoers file, and typically you can (as root) use the ﻿&#8221;visudo&#8221; command to do so.</p>
<p>Make sure apache can run commands, AND not require a password:</p>
<blockquote><p>apache  ALL=(ALL)       NOPASSWD: ALL</p></blockquote>
<p>Then you need to comment out this line:</p>
<blockquote><p>#Defaults    requiretty</p></blockquote>
<p>If you don&#8217;t, then you will see these errors in /var/log/secure: &#8220;sorry, you must have a tty to run sudo&#8221;. Now you are ready to go, and the PHP code is simple:</p>
<blockquote><p>$results = shell_exec(&#8216;sudo date&#8217;);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/websites/running-root-commands-in-php-via-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing to PHP5 in Yahoo Web Hosting</title>
		<link>http://blog.dougco.com/websites/changing-to-php5-in-yahoo-web-hosting/</link>
		<comments>http://blog.dougco.com/websites/changing-to-php5-in-yahoo-web-hosting/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 21:57:13 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Websites]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=122</guid>
		<description><![CDATA[﻿]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://www.businesspundit.com/wp-content/crisis-logos/Yahoo.jpg" alt="" width="216" height="130" />I was updating some code on a Yahoo hosted site, and it wasn&#8217;t working because Yahoo will default you to PHP4 on their hosting. My code of course requires PHP5.</p>
<p>I spent a fair amount of time searching around for an answer and finally found it at ﻿﻿﻿﻿﻿<a href="http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/php/php-38.html">http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/php/php-38.html</a></p>
<p>I was surprised at how difficult it was to find this switch option! After I made this post, Yahoo support replied to give me the proper link and some more information, which I must compliment Yahoo support for doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/websites/changing-to-php5-in-yahoo-web-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>http AJAX fails in Internet Explorer</title>
		<link>http://blog.dougco.com/coding/http-ajax-fails-in-internet-explorer/</link>
		<comments>http://blog.dougco.com/coding/http-ajax-fails-in-internet-explorer/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 22:29:51 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[responseText]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=107</guid>
		<description><![CDATA[I ran across an interesting bug recently where I had an AJAX routine failing when I viewed the page in IE8. When you clicked the little warning icon in the lower left, it gave a message of &#8220;﻿﻿﻿Object doesn&#8217;t support this property or method&#8221;﻿﻿﻿﻿﻿! It was failing around code that looks like: function parseCalcResponse() { [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across an interesting bug recently where I had an AJAX routine failing when I viewed the page in IE8. When you clicked the little warning icon in the lower left, it gave a message of &#8220;﻿﻿﻿Object doesn&#8217;t support this property or method&#8221;﻿﻿﻿﻿﻿!</p>
<p>It was failing around code that looks like:</p>
<blockquote>
<div id="_mcePaste">function parseCalcResponse() {</div>
<div id="_mcePaste" style="padding-left: 30px;">if (http.readyState == 4 &amp;&amp; http.status == 200) {</div>
<div id="_mcePaste" style="padding-left: 60px;">results = http.responseText;</div>
<div id="_mcePaste" style="padding-left: 60px;">results = results.split(&#8220;|||&#8221;);</div>
<div style="padding-left: 60px;">document.getElementById(&#8216;test&#8217;).innerHTML = results;</div>
<div style="padding-left: 30px;">}</div>
<div>}</div>
</blockquote>
<p>It turns out, the fix was to declare &#8220;results&#8221; at the top of the function code with:</p>
<blockquote><p>var results=&#8221;;</p></blockquote>
<p>And that fixed it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/coding/http-ajax-fails-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ontok&#8217;s domain has expired!</title>
		<link>http://blog.dougco.com/websites/ontoks-domain-has-expired/</link>
		<comments>http://blog.dougco.com/websites/ontoks-domain-has-expired/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 18:09:38 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Websites]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[expired]]></category>
		<category><![CDATA[ontok]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/uncategorized/ontoks-domain-has-expired/</guid>
		<description><![CDATA[I&#8217;ve been using ontok&#8217;s API for geocoding for a few years now, and all of a sudden my routines were getting errors! It turns out their domain expired! I&#8217;m not sure why they let that happen, I&#8217;m hoping they just didn&#8217;t pay attention and it will be back up soon. Maybe I should just call [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using ontok&#8217;s API for geocoding for a few years now, and all of a sudden my routines were getting errors! It turns out their domain expired!</p>
<p>I&#8217;m not sure why they let that happen, I&#8217;m hoping they just didn&#8217;t pay attention and it will be back up soon. Maybe I should just call Sourabh! <img src='http://blog.dougco.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Domain Name: ONTOK.COM<br />
Created on: 20-May-05<br />
Expires on: 20-May-09<br />
Last Updated on: 20-May-08</p>
<p>Administrative Contact:<br />
niyogi, sourabh  niyogi@mit.edu<br />
humdaq, inc.<br />
55 Grove St<br />
Somerville, Massachusetts 02144<br />
United States<br />
6177641078      Fax &#8211;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/websites/ontoks-domain-has-expired/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

