<?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>Technology: Learn and Share &#187; Web Development</title>
	<atom:link href="http://crazytoon.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://crazytoon.com</link>
	<description>Enterprise level solutions, LAMP, Linux, Apache, MySQL, PHP, Perl, Windows, Cache, Optimization</description>
	<lastBuildDate>Thu, 20 Oct 2011 20:56:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subversion:  How do you install and set up Subversion for revision control?</title>
		<link>http://crazytoon.com/2007/06/01/subversion-how-do-you-install-and-set-up-subversion-for-revision-control/</link>
		<comments>http://crazytoon.com/2007/06/01/subversion-how-do-you-install-and-set-up-subversion-for-revision-control/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 20:32:24 +0000</pubDate>
		<dc:creator>Sunny Walia</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Enterprise level solutions]]></category>
		<category><![CDATA[Linux System]]></category>
		<category><![CDATA[Linux Tips]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[System admin]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://crazytoon.com/2007/06/01/subversion-how-do-you-install-and-set-up-subversion-for-revision-control/</guid>
		<description><![CDATA[Code revision control is very crucial part of development.  It ensures you know who has changed which files and you are able to rollback to older versions in case new changes are breaking your website page or entire project.  There are few options for you if you are looking into setting up code revision control.  My preferred [...]]]></description>
			<content:encoded><![CDATA[<p>Code revision control is very crucial part of development.  It ensures you know who has changed which files and you are able to rollback to older versions in case new changes are breaking your website page or entire project.  There are few options for you if you are looking into setting up code revision control.  My preferred option is Subversion.  <a target="_blank" href="http://subversion.tigris.org/" title="Subversion: An open-source revision control system.">Subversion</a> is an open-source revision control system which is becoming more and more popular every day.  It is very easy to install and setup your project under Subversion.  If you want detailed instructions, please see the <a target="_blank" href="http://svnbook.org/" title="Subversion Book">Subversion Book</a>.  They do a great job explaining what revision control is, what are the different types of revision control are out there, detailed instructions on installing subversion, doing administrator tasks, etc.  Here are instructions on how to set up Subversion under CentOS.  Same instructions apply to most linux distributions. </p>
<p><strong>YUM Install</strong> </p>
<p>Easiest way to install subversion is via &#8220;yum&#8221; by typing:</p>
<p><code>yum install subversion</code></p>
<p>Once install is done, confirm it by typing &#8220;svn&#8221; at the prompt and you should get:</p>
<p><code>Type 'svn help' for usage.</code></p>
<p>At this point you can skip to &#8220;Setting up Subversion repository&#8221; part.</p>
<p><strong>SOURCE Install</strong></p>
<p>Obtain source from:  <a target="_blank" href="http://subversion.tigris.org/" title="Subversion: An open-source revision control system.">Subversion</a>.  At the time of writing, latest (1.4.3) version can be obtain from this link:  <a href="http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz">http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz</a></p>
<p><code>tar zxf subversion*<br />
cd subversion*<br />
./configure<br />
make &amp;&amp; make install</code></p>
<p>after everything goes well, type svn at the prompt and you should get:</p>
<p><code>Type 'svn help' for usage.</code></p>
<p><strong>Setting up Subversion repository</strong></p>
<p><code>adduser svnusers<br />
mkdir repos/branches -p<br />
mkdir repos/trunk -p<br />
mkdir repos/tags -p<br />
mkdir /svn<br />
svnadmin create /svn/demorepo<br />
svn import --message "Initial set up" repos <a href="file:///svn/demorepo">file:///svn/demorepo</a><br />
cd /svn/demorepo<br />
chown .svnusers . -R<br />
chmod 775 * -R<br />
chmod +s db</code></p>
<p>Thats all there is to it to setup Subversion repository.  At this point, you should <em>add any users</em> you want to have access to the repository by adding them to &#8220;svnusers&#8221; group.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<small>DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. <strong>Use at your own risk</strong>.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://crazytoon.com/2007/06/01/subversion-how-do-you-install-and-set-up-subversion-for-revision-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using url rewrite engine to serve default avatar to avoid checking for file in PHP</title>
		<link>http://crazytoon.com/2007/03/29/using-url-rewrite-engine-to-serve-default-avatar-to-avoid-checking-for-file-in-php/</link>
		<comments>http://crazytoon.com/2007/03/29/using-url-rewrite-engine-to-serve-default-avatar-to-avoid-checking-for-file-in-php/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 23:47:09 +0000</pubDate>
		<dc:creator>Sunny Walia</dc:creator>
				<category><![CDATA[Enterprise level solutions]]></category>
		<category><![CDATA[Linux System]]></category>
		<category><![CDATA[System admin]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://crazytoon.com/2007/03/29/using-url-rewrite-engine-to-serve-default-avatar-to-avoid-checking-for-file-via-php/</guid>
		<description><![CDATA[One of the great features of Apache is URL Rewrite.  It has helped me to do so many different tasks that I had to blog about this and share the love.  One of the things I used it for recently was to provide a solution for a simple problem which was being checked [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great features of Apache is URL Rewrite.  It has helped me to do so many different tasks that I had to blog about this and share the love.  One of the things I used it for recently was to provide a solution for a simple problem which was being checked at PHP level.</p>
<p>Problem:  Check an avatar file for user, if it exists on file system, use it, else show them a default avatar image.</p>
<p>Solution 1:  edit all of the php files which does anything with avatars to put that check in.  Not the best way to go and easily forgotten if new piece of code is put in which may cause showing broken images on the site.  Therefore solution 2 is more appropriate.</p>
<p>Solution 2(preferred):  Use Apache URL Rewriterule feature to take care of this issue.  Put .htaccess file in the directory where your avatars are with following content:</p>
<p><code>       RewriteEngine On<br />
RewriteBase /images/avatars/<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteRule . /images/avatars/default.gif [L]</code></p>
<p>Lets look at this line at a time.</p>
<p>First line turns the Rewrite engine on just in case if it wasn&#8217;t turned on already.<br />
Second line sets the base to the directory where we are going to be working in.<br />
Third line is where we check to see if the file requested exists or not (! negates -f which is is file?)<br />
Fourth line is where it redirects you to default avatar if requested avatar doesn&#8217;t exist.</p>
<p>There you go. Quick, robust, non-code solution.  URL Rewrite engine is VERY powerful.  What I showed here barely scratches the surface of all the features URL Rewrite engine has to offer.  Apache software foundation does a great job providing documentation and numerous examples you may want to look at.  The <a href="http://httpd.apache.org/docs/trunk/misc/rewriteguide.html" title="URL Rewriting Guide - Apache software foundation" target="_blank">URL Rewriting Guide</a> is one of the resources there.</p>
]]></content:encoded>
			<wfw:commentRss>http://crazytoon.com/2007/03/29/using-url-rewrite-engine-to-serve-default-avatar-to-avoid-checking-for-file-in-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL wait_timeout setting</title>
		<link>http://crazytoon.com/2007/02/20/mysql-wait_timeout-setting/</link>
		<comments>http://crazytoon.com/2007/02/20/mysql-wait_timeout-setting/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 01:17:37 +0000</pubDate>
		<dc:creator>Sunny Walia</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Server load]]></category>
		<category><![CDATA[System admin]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://crazytoon.com/2007/02/20/mysql-wait_timeout-setting/</guid>
		<description><![CDATA[We were having issues with mysql threads where they would be in sleep mode and wouldn&#8217;t die off for long time.  At the same time we started having issues with our servers where the load will spike and eventually server will come to halt unless we killed all the apache processes and restarted apache [...]]]></description>
			<content:encoded><![CDATA[<p>We were having issues with mysql threads where they would be in sleep mode and wouldn&#8217;t die off for long time.  At the same time we started having issues with our servers where the load will spike and eventually server will come to halt unless we killed all the apache processes and restarted apache (which seems to be the hung application).  We traced it back eventually and noticed that the time when server hung was when it burned through all the ram and was using up all the swap also.  So we started to work backwards and tried to resolve one thing at a time.  We started with MySQL.  We put in wait_timeout = 30 in to my.cnf and restarted mysql.  Than I closely watched the server for few hours and noticed that we didn&#8217;t have any more of those sleep connections.  GREAT! A work around until we get to bottom of whats causing this.  That was on Friday.  Sat we started noticing different problem.  Problem worsened and we started to look into what might&#8217;ve caused it and found out that we had a script which was pulling row at a time, processing it, and deleting the row.  Except, it was never getting to delete the row due to timeout would kick in and close the connection.  We found this out when we watched error logs and saw:  Mysql has gone away message.</p>
<p>We took out the wait timeout and everything seems to started to work fine.  Did anybody ever notice this behavior where you would loose connection to the mysql server due to timeout?  The script which processes line by line and deletes line by line takes fraction of second to process that particular line.  Does wait timeout starts counting from the starting of the connection?  Does it mean that wait timeout is actually a max connection time limit?  Suggestions/comments?</p>
<p>Edit 5/31/09:  Friend of mine was getting this error: <code>database error: Lost connection to MySQL server during query </code><br />
he got around it by adjusting wait_timeout setting. </p>
]]></content:encoded>
			<wfw:commentRss>http://crazytoon.com/2007/02/20/mysql-wait_timeout-setting/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

