<?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>George Papayiannis &#187; Linux</title>
	<atom:link href="http://www.sematopia.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sematopia.com</link>
	<description></description>
	<lastBuildDate>Sat, 01 May 2010 04:50:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing PECL Filter on Debian Linux (AMD64)</title>
		<link>http://www.sematopia.com/2008/10/installing-pecl-filter-on-debian-linux-amd64/</link>
		<comments>http://www.sematopia.com/2008/10/installing-pecl-filter-on-debian-linux-amd64/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 23:32:46 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=263</guid>
		<description><![CDATA[I just finished installing the PECL filter extension on my Debian install (AMD64), and by God, it was painful.  This process was so brutal with so many ways to screw up.  Here are the steps:
Install php5-dev package.  During the process of not figuring out what was going on, I also installed the [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished installing the PECL filter extension on my Debian install (AMD64), and by God, it was painful.  This process was so brutal with so many ways to screw up.  Here are the steps:</p>
<p>Install php5-dev package.  During the process of not figuring out what was going on, I also installed the php4-dev package.  I&#8217;m pretty sure I only needed php5-dev.</p>
<p>Download PCRE &#8211; Perl Compatible Regular Expressions <a href="http://www.pcre.org/">from here</a>.  Be sure you have g++ installed (not just gcc as I was getting a strange error).  Extract, configure, make and make install.  If your running AMD64, be sure to compile using the -fPIC flag.  <a href="http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&#038;chap=3">See here for information why</a>.  Filter will look for the library in /usr/local/, so you&#8217;ll have to setup a link or copy it from /usr/local/lib/ so the PECL install can find it.</p>
<p>The Filter package also looks for the header files from the php_pcre extension.  The only way I found to get at these header files was to download the PHP source.  So depending on what version of PHP you have, <a href="http://www.php.net/downloads.php">go here</a> and download the zip.  Copy the entire pcre folder from within the extension (ext) folder into your /usr/include/php5/ext/ folder.</p>
<p>Now it&#8217;s time to attempt the actual PECL Filter install.  If your doing this from the tarball and your running on an AMD64, as above, be sure to add the -fPIC flag.  I used the PECL installer, so I ran: pecl install filter.  Since the package is not &#8220;stable&#8221; yet, you&#8217;ll need to point right to the channel, just read the message, in my case it was: pecl install channel://pecl.php.net/filter-0.11.0.  After the compile/install is done, add extension=filter.so to your php.ini file.  If you can&#8217;t find it, type find / -name php.ini from your command line.</p>
<p>That&#8217;s it.  I may have forgotten a step, if so add a comments please.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2008/10/installing-pecl-filter-on-debian-linux-amd64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Linux: Generate Thumbnail Image of External URL</title>
		<link>http://www.sematopia.com/2007/10/ubuntu-linux-generate-thumbnail-image-of-external-url/</link>
		<comments>http://www.sematopia.com/2007/10/ubuntu-linux-generate-thumbnail-image-of-external-url/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 18:22:31 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=219</guid>
		<description><![CDATA[This was surprisingly a lot harder to figure out than I initially expected.  I was doing a lot of searching and kept finding either solutions for windows or packages that cost money.  To add to the problem, I needed a solution that ran in a command line only version of Linux (Ubuntu Server). [...]]]></description>
			<content:encoded><![CDATA[<p>This was surprisingly a lot harder to figure out than I initially expected.  I was doing a lot of searching and kept finding either solutions for windows or packages that cost money.  To add to the problem, I needed a solution that ran in a command line only version of Linux (Ubuntu Server).  I guess I was naive to think the PHP gd library would support this.  After a lot of digging last night, I found <a href="http://www.boutell.com/webthumb">webthumb</a>.  Getting it work was surprisingly easy using the instructions provided, just replace mozilla for firefox and add the xwd package:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>apt-get install xvfb
apt-get install firefox
apt-get install netpbm
apt-get install xwd

wget http://www.boutell.com/webthumb/webthumb.tar.gz
tar xvzf webthumb.tar.gz
cd webth*
./webthumb http://www.sematopia.com/ | pnmscale -xysize 100 100 | pnmtojpeg > thumb.jpg</pre>
</div>
<p></code></div>
</div>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2007/10/ubuntu-linux-generate-thumbnail-image-of-external-url/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Apache SVN: Auto-Update Server Copy on Commit</title>
		<link>http://www.sematopia.com/2007/10/apache-svn-auto-update-server-copy-on-commit/</link>
		<comments>http://www.sematopia.com/2007/10/apache-svn-auto-update-server-copy-on-commit/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 04:32:06 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=218</guid>
		<description><![CDATA[It seems these days I spend more time figuring out annoying problems rather than doing any real work.  The following gave me another big headache: Getting SVN to auto-update properly via it&#8217;s hooks.  SVN provides you the ability to specify hooks after certain events occur with the repository in question.  For example, [...]]]></description>
			<content:encoded><![CDATA[<p>It seems these days I spend more time figuring out annoying problems rather than doing any real work.  The following gave me another big headache: Getting SVN to auto-update properly via it&#8217;s hooks.  SVN provides you the ability to specify hooks after certain events occur with the repository in question.  For example, say you have a live application under version control and you want SVN to auto-update the live copy (on the server) after every commit.  I guess that makes sense, especially if you want to develop and test in your production environment, on the fly.</p>
<p>In the directory were your repository exists there should be a <strong>hooks</strong> directory.  This directory includes a bunch of tmpl files that get called depending on the event that just occurred.  The file that I cared about was the post-commit.tmpl file.</p>
<p>Assuming your running SVN using Apache, then most likely when your post-commit script gets called it will be executed using the user www-data.  This is important because it means your repository needs to be checked out via the same user to ensure no permission problems occur.  Assuming that OK, then add the following line to your post-commit.tmpl file:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>/usr/bin/svn update &#60;path to repo> --username xxxxxx --password xxxxxx</pre>
</div>
<p></code></div>
</div>
<p>Hardcoding your SVN password in the file is probably not the best idea, but if your the only one who would have access to the file, then who cares.  Notice how I put a full path to SVN, that&#8217;s because when the hook scripts get called all environment variables, etc. get removed.  The next step, and probably most important, rename the file removing the .tmpl extension and change the ownership so the file becomes executable.</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>cp post-commit.tmpl post-commit
chmod +x post-commit</pre>
</div>
<p></code></div>
</div>
<p>That should do it, so when you update your repository, SVN should auto-update your live working copy.  Most likely you&#8217;ll run into problems, if so check the links below for more info.</p>
<p><a href="http://www.petefreitag.com/item/244.cfm">Helpful Link #1</a><br />
<a href="http://subversion.tigris.org/faq.html#website-auto-update">Helpful Link #2</a><br />
<a href="http://subversion.tigris.org/faq.html#hook-debugging">Helpful Link #3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2007/10/apache-svn-auto-update-server-copy-on-commit/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Apache: Forwarding Requests to Another Server</title>
		<link>http://www.sematopia.com/2007/09/apache-forwarding-requests-to-another-server/</link>
		<comments>http://www.sematopia.com/2007/09/apache-forwarding-requests-to-another-server/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 03:55:05 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=217</guid>
		<description><![CDATA[This caused me a headache tonight.  I&#8217;ll explain below how to forward requests from one Apache HTTP server to another on your network.  Here are the main characters:
Server0: Your primary HTTP webserver that all external requests come to initially.
Server1: A secondary server you have setup (with Apache) to handle requests for xyz.com.  [...]]]></description>
			<content:encoded><![CDATA[<p>This caused me a headache tonight.  I&#8217;ll explain below how to forward requests from one Apache HTTP server to another on your network.  Here are the main characters:</p>
<p><strong>Server0</strong>: Your primary HTTP webserver that all external requests come to initially.<br />
<strong>Server1</strong>: A secondary server you have setup (with Apache) to handle requests for xyz.com.  The (internal) server IP is 192.168.2.10.</p>
<p>At the heart of making this possible is the mod_rewrite module available with Apache.  This module seems very powerful and I only understand a small portion of it.  First off you need to enable mod_rewrite and mod_proxy on Server0:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>a2enmod rewrite
a2enmod proxy
/etc/init.d/apache2 force-reload</pre>
</div>
<p></code></div>
</div>
<p>mod_proxy needs to be enabled and configured (proxy.conf), otherwise Apache won&#8217;t allow mod_rewrite to forward the request.  Here is the relevant portion of proxy.conf (found in /etc/apache2/mods-enabled):</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>&#60;Proxy *>
   Order deny,allow
   Deny from all
&#60;/Proxy>

&#60;Proxy http://xyz.com>
   Order deny,allow
   Deny from all
   Allow from all
&#60;/Proxy></pre>
</div>
<p></code></div>
</div>
<p>Now that you have the prerequisites ready, you can create the site definition on Server0 (/etc/apache2/sites-available/xyz.com):</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>&#60;VirtualHost *>
   ServerName www.xyz.com
   # RewriteLog "/var/log/apache2/rewrite.log"
   # RewriteLogLevel 9
   RewriteEngine     On
   RewriteRule       ^(.*)$        http://xyz.com$1  [P]
   ServerAlias xyz.com
&#60;/VirtualHost></pre>
</div>
<p></code></div>
</div>
<p>Notice the rewrite rule, which will forward the request.  Since xyz.com (on server0) will now point to server1, you need to update your /etc/hosts file accordingly:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>192.168.2.10    xyz.com
192.168.2.10    www.xyz.com</pre>
</div>
<p></code></div>
</div>
<p>Now enable the the new site and restart Apache:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>a2ensite xyz.com
/etc/init.d/apache2 restart</pre>
</div>
<p></code></div>
</div>
<p>Now your done with Server0.  You&#8217;ll be glad to know there is nothing out of the ordinary for you to do on Server1.  All you have to do is create the site definition and enable (like you normally would).  So in /etc/apache2/sites-available create a site definition called xyz.com:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>&#60;VirtualHost *>
   ServerName www.xyz.com
   DocumentRoot /var/www/xyz
   ServerAlias xyz.com
&#60;/VirtualHost></pre>
</div>
<p></code></div>
</div>
<p>Then enable the site, restart Apache and everything should work.  Odds have it something will go wrong and if it does, make sure to look in the Apache logs (/var/log/apache2/).  Also, enable the rewrite log (see above).  The logs will most likely always tell you exactly what went wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2007/09/apache-forwarding-requests-to-another-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Friday wrap-up #3</title>
		<link>http://www.sematopia.com/2006/10/friday-wrap-up-3/</link>
		<comments>http://www.sematopia.com/2006/10/friday-wrap-up-3/#comments</comments>
		<pubDate>Sun, 29 Oct 2006 02:22:03 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Corporate]]></category>
		<category><![CDATA[Friday]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[iSeries]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=155</guid>
		<description><![CDATA[This was a busy week, a lot of catching up from all the time spent at CASCON last week.  Continuing on from last week, I&#8217;ve gotten more intimate (?) with Dojo and its inner workings.  I wrote about Dojo a couple months ago, and I&#8217;m still really impressed with everything going on there. [...]]]></description>
			<content:encoded><![CDATA[<p>This was a busy week, a lot of catching up from all the time spent at CASCON last week.  Continuing on from last week, I&#8217;ve gotten more intimate (?) with Dojo and its inner workings.  I wrote about Dojo a couple months ago, and I&#8217;m still really impressed with everything going on there.  A lot of big name sites are built off this toolkit, including Meebo.</p>
<p>IBM results came out last week, the System i had a rough quarter, but IBM did well overall.  Last year at this time (3Q05) the System i had a break out quarter due to an upgrade cycle.  This  year (3Q06) there were no new upgrades and results were the same as 3Q04.  This <a href="http://www.systeminetwork.com/article/news/53420/index.html">article sums things up</a>:</p>
<blockquote><p>
IBM revenue for the System i fell 22 percent in the third quarter of 2006, or 23 percent at constant currency when compared to the same period of 2005. At the same time, nearly every other major IBM business unit saw revenue increase. Overall, earnings rose 47 percent compared to the previous year, up to $2.22 billion on revenues of $22.6 billion, which were up 5 percent.</p>
<p>The supply chain issues IBM faced in the second quarter of this year for System i sales, which were connected to a 7 percent drop in revenue for System i over the second quarter of 2005, have cleared up. IBM CFO Mark Loughridge noted that IBM&#8217;s supply chain did a superb job delivering System p, i, z, and storage but faltered over System x deliveries, contributing to the low rise of 4 percent for the System x. System p revenues increased 10 percent, and System z was a breakout star with a 25 percent increase in revenues while IBM delivered a 16 percent increase in System z MIPS (millions of instructions per second).</p>
<p>For the System i, IBM says 3Q06 compares to a particularly strong 3Q05 quarter, which was driven by upgrade activity from a fully refreshed roadmap, which in turn caused slowing revenue as customers leveraged those previous upgrades. Overall, IBM notes that System i revenue performance remains dependent upon cyclical upgrades.
</p></blockquote>
<p>I was at a Halloween fund raiser for Diabetes last night, it was a good time for a good cause.  I&#8217;m amazed that no matter what type of social event I may be at, there&#8217;s always someone thats directly involved with the System i in some way.</p>
<p>In other news, RedHat got murdered this week in the markets.  Cisco announced they would be creating a fork the RedHat&#8217;s version of Linux and providing half price support until the new year.  If any good can be seen out of this, it just re-affirms RedHat&#8217;s dominance in the Enterprise Linux market.</p>
<p>FireFox 2 came out this week, it generally seems more responsive, but definitely not as polished as it should be.  The memory leak issue doesn&#8217;t seem to have been fixed, since as I type FireFox is using upwards of 80mb memory and climbing.  The new spell checking feature is great though, any work misspelled get underlined in red, right click the and suggestions appear.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/10/friday-wrap-up-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-To: Set up SVN with Apache2 in Linux (Ubuntu)</title>
		<link>http://www.sematopia.com/2006/03/how-to-set-up-svn-with-apache2-in-linux-ubuntu/</link>
		<comments>http://www.sematopia.com/2006/03/how-to-set-up-svn-with-apache2-in-linux-ubuntu/#comments</comments>
		<pubDate>Fri, 24 Mar 2006 07:21:14 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=66</guid>
		<description><![CDATA[Initially I didn&#8217;t plan on writing anything up about this, since its pretty basic to setup.  But I ran into a slight problem, which I imagine others might run into also.  I guess most would have Apache running already, so all that is needed is SVN:

Code:


> apt-get install subversion libapache2-svn



Say you have a [...]]]></description>
			<content:encoded><![CDATA[<p>Initially I didn&#8217;t plan on writing anything up about this, since its pretty basic to setup.  But I ran into a slight problem, which I imagine others might run into also.  I guess most would have Apache running already, so all that is needed is SVN:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>> apt-get install subversion libapache2-svn</pre>
</div>
<p></code></div>
</div>
<p>Say you have a domain already set up, call it abc.com.  You want to be able to checkout a repository from abc.com/svn.</p>
<p>Open the following file (/etc/apache2/mods-available/dav_svn.conf) in an editor and follow the instructions.  In the most basic form (with no authentication) you&#8217;ll have something like this when your done:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>&#60; Location /abc.com/svn >
DAV svn
SVNPath /svn
&#60; /Location></pre>
</div>
<p></code></div>
</div>
<p>Inside the < Location /abc.com/svn > that path must point to a directory in your web server which does NOT exist.  abc.com will exist, but make sure svn doesn&#8217;t.  The SVNPath will point to the actual repository which MUST be outside your web server space.</p>
<p>This way, if you go to a browser and type: http://www.abc.com/svn nothing will show up, but when you checkout your repository, you will be re-directed to the actual svn directory (in this case /svn).</p>
<p>Now create the SVN repository, in directory /svn</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>> svnadmin create /svn</pre>
</div>
<p></code></div>
</div>
<p>Be sure to change the permissions on this directory, so the web server can write to the folder:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>> chown -R www-data /svn</pre>
</div>
<p></code></div>
</div>
<p>Restart Apache2:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>> /etc/init.d/apache2 -k restart</pre>
</div>
<p></code></div>
</div>
<p>Now from a remote computer, you should be able to type:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>svn co http://xxx.xxx.xxx.xx/abc.com/svn &#60; name ></pre>
</div>
<p></code></div>
</div>
<p>(were xxx.xxx.xxx.xxx is your server ip and name is what you want to call the local folder)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/03/how-to-set-up-svn-with-apache2-in-linux-ubuntu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Using XML to store/send emails</title>
		<link>http://www.sematopia.com/2006/01/using-xml-to-storesend-emails/</link>
		<comments>http://www.sematopia.com/2006/01/using-xml-to-storesend-emails/#comments</comments>
		<pubDate>Fri, 27 Jan 2006 05:24:57 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=52</guid>
		<description><![CDATA[This has been a rough week, 4 assignments, an MIS, etc.  I made that phpPostFix script, its very simple, but I won't be able to use it.  My main server with GoDaddy is so terrible.  Its running an old version of PHP (4.2).  This version did not have file_get_contents as a function, so to make up for it, a while ago, I set up the PEAR Compat replacements.  To make a long story short, there are limitations in PHP 4.2 that for some reason, file_get_contents (the PEAR version used in PHP 4.2) can not accept URLs with more than 1 parameter.]]></description>
			<content:encoded><![CDATA[<p>This has been a rough week, 4 assignments, an MIS, etc.  I made that phpPostFix script, its very simple, but I won&#8217;t be able to use it.  My main server with GoDaddy is so terrible.  Its running an old version of PHP (4.2).  This version did not have file_get_contents as a function, so to make up for it, a while ago, I set up the PEAR Compat replacements.  To make a long story short, there are limitations in PHP 4.2 that for some reason, file_get_contents (the PEAR version used in PHP 4.2) can not accept URLs with more than 1 parameter.</p>
<p>I know what your thinking: &#8220;Just upgrade your version of PHP&#8221;.  You obviously have never used a GoDaddy product.  This is not an easy task, especially since their servers are married to Plesk and all the crap that come with it.  Above all that the main server is fully deployed, I can&#8217;t risk upgrading a shady setup.  Anyways, here <a href="http://www.sematopia.com/upload/phpPostFix/phpPostFix.tgz">is the script</a> that I wrote.  It does the job as explained in the previous post.  </p>
<p>Using the script is as easy as the following:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>$to = "someperson@yahoo.com";
$subject = "Test email";
$query_string = 'to='.urlencode($to).'&#038;subject='.urlencode($subject);
file_get_contents("http://www.someserver.com/phpPostFix.php?".htmlentities($query_string));</pre>
</div>
<p></code></div>
</div>
<p>I still need to be able to send email from development server.  So I spent some time thinking about it earlier this week.  I&#8217;m going to write the emails which need to be sent to an XML file (send.xml).  The schema will be as follows:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>&#60;email>
&#60;to>&#60;/to>
&#60;cc>&#60;/cc>
&#60;bcc>&#60;/bcc>
&#60;subject>&#60;/subject>
&#60;body>&#60;/body>
&#60;/email></pre>
</div>
<p></code></div>
</div>
<p>Every 5 minutes the main server will read the XML file, parse it, and send the emails based on the results.  Once the emails are read, it will clear the original XML file (or append it to another backup.xml file).  At this point any new emails will be written to a fresh send.xml.  This method makes intuitive sense (sending in batch), especially since the development server could be sending hundreds of emails a day.  Lets hope this goes without a problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/01/using-xml-to-storesend-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My solution to port 25 being blocked</title>
		<link>http://www.sematopia.com/2006/01/my-solution-to-port-25-being-blocked/</link>
		<comments>http://www.sematopia.com/2006/01/my-solution-to-port-25-being-blocked/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 04:58:46 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=51</guid>
		<description><![CDATA[So I've spent the last 2 days straight trying to get a full scale mail server running on my development Ubuntu server.  I had heard it wasn't going to be easy, but it needed to happen.  The plan was to go all out (Postfix + Courier IMAP  + Amavisd-new + SpamAssassin + ClamAV + SASL + TLS + SquirrelMail + Postgrey).  At around 7:00pm today, when I was completely defeated as to why it wasn't working it hit me: I bet my ISP has port 25 blocked.  A quick search on Google proved me right.]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve spent the last 2 days straight trying to get a full scale mail server running on my development Ubuntu server.  I had heard it wasn&#8217;t going to be easy, but it needed to happen.  The plan was to go all out (Postfix + Courier IMAP  + Amavisd-new + SpamAssassin + ClamAV + SASL + TLS + SquirrelMail + Postgrey).  At around 7:00pm today, when I was completely defeated as to why it wasn&#8217;t working it hit me: I bet my ISP has port 25 blocked.  A quick search on Google proved me right.</p>
<p>Depressed and annoyed I turned off my laptop, went to the library and then to the gym.  While reading Data Mining slides it hit me, I have my main dedicated server at GoDaddy (not to say they haven&#8217;t <a href="http://www.sematopia.com/?p=33">done me wrong</a> in the past).  I was considering using some relay host, but I thought of something better:  I&#8217;ll write a PHP script, which will reside on the main server, and will send mail the standard way (sendmail).  The PHP script (lets call it phpPostFix) will be accessed as a URL, and its parameters will be simply:<br />
- To:<br />
- From:<br />
- Subject:<br />
- Body:</p>
<p>On the development server any time I have:</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre>&#60;?php

file_get_contents("http://www.xxxxxx.com/phpPostFix.php?to=xxx@yy.com&#038;from=.....");

?></pre>
</div>
<p></code></div>
</div>
<p>Then the email will be sent.  Simple as that.  I&#8217;ll post the script when its done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/01/my-solution-to-port-25-being-blocked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: Static IP from command line in Ubuntu-Server</title>
		<link>http://www.sematopia.com/2006/01/static-ip-from-command-line-in-ubuntu-server/</link>
		<comments>http://www.sematopia.com/2006/01/static-ip-from-command-line-in-ubuntu-server/#comments</comments>
		<pubDate>Mon, 16 Jan 2006 01:12:02 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=50</guid>
		<description><![CDATA[In Ubuntu-Server everything is from the command line, and most likely your going to need to set a static ip to your server.  All network interface settings are in /etc/network/interfaces.  Here is what to do:]]></description>
			<content:encoded><![CDATA[<p>In Ubuntu-Server everything is from the command line, and most likely your going to need to set a static ip to your server.  All network interface settings are in the /etc/network/interfaces file.  Here is what to do:</p>
<p>1. Backup /etc/network/interfaces<br />
2. edit the file with vi.  Here you can set the static setting as below.  In my case I set the static router ip to be 192.168.1.100</p>
<div class='code_parent'>
<div class='code_title'>Code:</div>
<div class='code_child'><code>
<div class='pre_container'>
<pre># This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
        script grep
        map eth0

# The primary network interface
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1</pre>
</div>
<p></code></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/01/static-ip-from-command-line-in-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu-Server quick comments</title>
		<link>http://www.sematopia.com/2006/01/ubuntu-server-quick-comments/</link>
		<comments>http://www.sematopia.com/2006/01/ubuntu-server-quick-comments/#comments</comments>
		<pubDate>Sat, 14 Jan 2006 07:19:44 +0000</pubDate>
		<dc:creator>George A. Papayiannis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.sematopia.com/?p=49</guid>
		<description><![CDATA[If your going to be administering an Ubuntu server remotely, be sure to leave the install cd  in the cdrom drive.  While I was installing SSH, for some reason the Ubuntu-Server cd was requested.  Even typing this now I'm doubting what I saw.. but anyways, no harm in leaving the cd inside.]]></description>
			<content:encoded><![CDATA[<p>If your going to be administering an Ubuntu server remotely, be sure to leave the install cd  in the cdrom drive.  While I was installing SSH, for some reason the Ubuntu-Server cd was requested.  Even typing this now I&#8217;m doubting what I saw.. but anyways, no harm in leaving the cd inside.</p>
<p>Though the following makes sense looking back, when I first realized it I was pleasantly surprised:  To turn the server on, all that has to be done is turn the computer on.  Once Ubuntu-Server is at the login screen (assuming everything is setup properly) then the web server is running.  Of course this makes sense, it would be the ultimate security risk leaving the web server logged in, unattended.</p>
<p>I&#8217;m blown away how simple it is to get Apache/PHP/MySQL up and going.  In Windows I wrote a fairly <a href="http://www.sematopia.com/?p=28">extensive tutorial</a> on getting started.  Using the Debian apt-get command in Ubuntu, I literally had the server running in less than 5 minutes.</p>
<p>Next steps: Setup SendMail, DNS binds and configure the Apache config file to handle the beating the computer is going take.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sematopia.com/2006/01/ubuntu-server-quick-comments/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
