<?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>Anil Konsal</title>
	<atom:link href="http://www.anilkonsal.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.anilkonsal.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Apr 2012 02:34:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Page not found in pagination on Category Page in WordPress</title>
		<link>http://www.anilkonsal.com/page-not-found-in-pagination-on-category-page-in-wordpress?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=page-not-found-in-pagination-on-category-page-in-wordpress</link>
		<comments>http://www.anilkonsal.com/page-not-found-in-pagination-on-category-page-in-wordpress#comments</comments>
		<pubDate>Wed, 02 Nov 2011 07:49:29 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[WordPRess]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=105</guid>
		<description><![CDATA[If I set the value of posts_per_page variable on query_posts to a lower value than that set on the settings page than I will get the 404 error. Example: settings set to 10 posts per [...]]]></description>
			<content:encoded><![CDATA[<p>If I set the value of posts_per_page variable on query_posts to a lower value than that set on the settings page than I will get the 404 error.<br />
Example: settings set to 10 posts per page [$ppp = get_option('posts_per_page') will echo 10]<br />
posts_per_page set to 3 on query_posts<br />
If I have a total of 9 posts on my wordpress database then, with the settings above, page two will not show and I get the 404 error!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/page-not-found-in-pagination-on-category-page-in-wordpress/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Canvas Padded thumbnails using PHP and GD in Zend Framework Application</title>
		<link>http://www.anilkonsal.com/canvas-padded-thumbnails-using-php-and-gd-in-zend-framework-application?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=canvas-padded-thumbnails-using-php-and-gd-in-zend-framework-application</link>
		<comments>http://www.anilkonsal.com/canvas-padded-thumbnails-using-php-and-gd-in-zend-framework-application#comments</comments>
		<pubDate>Fri, 07 Oct 2011 12:31:21 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=86</guid>
		<description><![CDATA[function showThumbnail($imageFileName='', $width='', $height='', $cwidth='', $cheight='') { $cfg = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini', 'production'); $path = $cfg->resources->frontController->imageupload->path; $publicpath = $cfg->resources->frontController->imageupload->publicpath; $pi = pathinfo($imageFileName); $filename = $pi['filename']; $ext = $pi['extension']; $thumbname = $filename.'-'.$width.'X'.$height.'.'.$ext; $fspath = APPLICATION_PATH.'/..'.$path.'/'.$imageFileName; $fspathThumb = [...]]]></description>
			<content:encoded><![CDATA[<pre  class="prettyprint linenums">
function showThumbnail($imageFileName='', $width='', $height='', $cwidth='', $cheight='')
{
	$cfg = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini', 'production');
	$path = $cfg->resources->frontController->imageupload->path;
	$publicpath = $cfg->resources->frontController->imageupload->publicpath;

	$pi = pathinfo($imageFileName);
	$filename = $pi['filename'];
	$ext = $pi['extension'];

	$thumbname = $filename.'-'.$width.'X'.$height.'.'.$ext;

	$fspath = APPLICATION_PATH.'/..'.$path.'/'.$imageFileName;
	$fspathThumb = APPLICATION_PATH.'/..'.$path.'/'.$thumbname;

	if(!file_exists($fspathThumb)) {
		thumb($fspath, $width, $height, $cwidth, $cheight, $fspathThumb);
	}

	return $publicpath.'/'.$thumbname;
}

function thumb($img, $w, $h, $cw='', $ch='', $thumb, $fill='') {
	if (!extension_loaded('gd') &#038;&#038; !extension_loaded('gd2')) {
		trigger_error("No dispones de la libreria GD para generar la imagen.", E_USER_WARNING);
		return false;
	}

	$imgInfo = getimagesize($img);
	switch ($imgInfo[2]) {
		case 1: $im = imagecreatefromgif($img); break;
		case 2: $im = imagecreatefromjpeg($img);  break;
		case 3: $im = imagecreatefrompng($img); break;
		default:  trigger_error('Tipo de imagen no reconocido.', E_USER_WARNING);  break;
	}

	if ($imgInfo[0] <= $w &#038;&#038; $imgInfo[1] <= $h) {
		$nHeight = $imgInfo[1];
		$nWidth = $imgInfo[0];
	}else{
		if ($w/$imgInfo[0] < $h/$imgInfo[1]) {
			$nWidth = $w;
			$nHeight = $imgInfo[1]*($w/$imgInfo[0]);
			$ny = ($h - $nHeight)/2;
		}else{
			$nWidth = $imgInfo[0]*($h/$imgInfo[1]);
			$nHeight = $h;
			$nx = ($w - $nWidth)/2;
		}
	}

	$nWidth = round($nWidth);
	$nHeight = round($nHeight);

	$newImg = imagecreatetruecolor($nWidth, $nHeight);
	$newImg = imagecreatetruecolor($w, $h);
	$fillColor = imagecolorallocate($newImg, 0xFF, 0xFF, 0xFF);
	imagefill($newImg, 0, 0, $fillColor);

	imagecopyresampled($newImg, $im, $nx, $ny, 0, 0, $nWidth, $nHeight, $imgInfo[0], $imgInfo[1]);

	switch ($imgInfo[2]) {
		case 1: imagegif($newImg , $thumb); break;
		case 2: imagejpeg($newImg, $thumb);  break;
		case 3: imagepng($newImg, $thumb); break;
		default:  trigger_error('Imposible mostrar la imagen.', E_USER_WARNING);  break;
	}

	imagedestroy($newImg);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/canvas-padded-thumbnails-using-php-and-gd-in-zend-framework-application/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN Post Commit hook</title>
		<link>http://www.anilkonsal.com/svn-post-commit-hook?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=svn-post-commit-hook</link>
		<comments>http://www.anilkonsal.com/svn-post-commit-hook#comments</comments>
		<pubDate>Sun, 02 Oct 2011 06:47:19 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=80</guid>
		<description><![CDATA[Some days ago, I got a requirement of giving access to 3 users to my SVN repo over ssh. #groupadd dev #useradd -g dev auser #useradd -g dev buser #useradd -g dev cuser Then set [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago, I got a requirement of giving access to 3 users to my SVN repo over ssh.<br />
<code><br />
#groupadd dev<br />
#useradd -g dev auser<br />
#useradd -g dev buser<br />
#useradd -g dev cuser<br />
</code><br />
Then set the passwords for each user.</p>
<p>For SVN, update changes, you need to have the working copy owned by dev group<br />
<code><br />
#chmod 0775 -R myworkingcopy<br />
#chown -R apache:dev myworkingcopy<br />
</code><br />
For svn post commit hook<br />
<code><br />
#chown apache:dev post-commit<br />
#chmod 0755 post-commit<br />
</code><br />
The point here is that the user committing the changes should have the write permissions to the working copy and execute permissions on the post-commit hook</p>
<p>and all is good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/svn-post-commit-hook/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC .htaccess with exclusion of .html files</title>
		<link>http://www.anilkonsal.com/mvc-htaccess-with-exclusion-of-html-files?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mvc-htaccess-with-exclusion-of-html-files</link>
		<comments>http://www.anilkonsal.com/mvc-htaccess-with-exclusion-of-html-files#comments</comments>
		<pubDate>Tue, 30 Aug 2011 06:41:27 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=76</guid>
		<description><![CDATA[RewriteEngine on RewriteRule ^\.htaccess$ - [F] RewriteRule ^(.*)\.html$ - [L] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} !^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^public/.*$ /public/index.php [NC,L]]]></description>
			<content:encoded><![CDATA[<p><code><br />
<code><br />
RewriteEngine on</p>
<p>RewriteRule ^\.htaccess$ - [F]<br />
RewriteRule ^(.*)\.html$ - [L]<br />
RewriteCond %{REQUEST_URI} =""<br />
RewriteRule ^.*$ /public/index.php [NC,L]</p>
<p>RewriteCond %{REQUEST_URI} !^/public/.*$<br />
RewriteRule ^(.*)$ /public/$1</p>
<p>RewriteCond %{REQUEST_FILENAME} -f</p>
<p>RewriteRule ^.*$ - [NC,L]<br />
RewriteRule ^public/.*$ /public/index.php [NC,L]<br />
</code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/mvc-htaccess-with-exclusion-of-html-files/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework Project .htaccess with exclusion of folders</title>
		<link>http://www.anilkonsal.com/zend-framework-project-htaccess-with-exclusion-of-folders?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zend-framework-project-htaccess-with-exclusion-of-folders</link>
		<comments>http://www.anilkonsal.com/zend-framework-project-htaccess-with-exclusion-of-folders#comments</comments>
		<pubDate>Tue, 30 Aug 2011 06:05:41 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=71</guid>
		<description><![CDATA[Options +FollowSymLinks RewriteEngine on RewriteRule ^\.htaccess$ - [F] RewriteRule ^(blog&#124;forum)($&#124;/) - [L] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} !^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^public/.*$ /public/index.php [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
Options +FollowSymLinks<br />
RewriteEngine on</p>
<p>RewriteRule ^\.htaccess$ - [F]</p>
<p>RewriteRule ^(blog|forum)($|/) - [L]</p>
<p>RewriteCond %{REQUEST_URI} =""<br />
RewriteRule ^.*$ /public/index.php [NC,L]</p>
<p>RewriteCond %{REQUEST_URI} !^/public/.*$<br />
RewriteRule ^(.*)$ /public/$1</p>
<p>RewriteCond %{REQUEST_FILENAME} -f<br />
RewriteRule ^.*$ - [NC,L]</p>
<p>RewriteRule ^public/.*$ /public/index.php [NC,L]<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/zend-framework-project-htaccess-with-exclusion-of-folders/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exporting unversioned files with SVN</title>
		<link>http://www.anilkonsal.com/exporting-unversioned-files-with-svn?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=exporting-unversioned-files-with-svn</link>
		<comments>http://www.anilkonsal.com/exporting-unversioned-files-with-svn#comments</comments>
		<pubDate>Sat, 28 May 2011 05:11:46 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn export unversioned shell]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=60</guid>
		<description><![CDATA[You can just use cp -r to copy the directory tree directly, and then remove the .svn directories afterwards: # cp -r x # cd x # find . -name .svn -type d -exec rm [...]]]></description>
			<content:encoded><![CDATA[<p>You can just use cp -r to copy the directory tree directly, and then remove the .svn directories afterwards:<br />
# cp -r x<br />
# cd x<br />
# find . -name .svn -type d -exec rm -r &#8216;{}&#8217; \;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/exporting-unversioned-files-with-svn/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drop Down menu hiding behind Flash in internet explorer</title>
		<link>http://www.anilkonsal.com/drop-down-menu-hiding-behind-flash-in-internet-explorer?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drop-down-menu-hiding-behind-flash-in-internet-explorer</link>
		<comments>http://www.anilkonsal.com/drop-down-menu-hiding-behind-flash-in-internet-explorer#comments</comments>
		<pubDate>Fri, 20 May 2011 08:08:23 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=58</guid>
		<description><![CDATA[For this you have to make the flash movie transparent. set the wmode property to transparent in the flash object]]></description>
			<content:encoded><![CDATA[<p>For this you have to make the flash movie transparent. set the wmode property to transparent in the flash object</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/drop-down-menu-hiding-behind-flash-in-internet-explorer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Map Polygons draw internet explorer unspecified error</title>
		<link>http://www.anilkonsal.com/google-map-polygons-draw-internet-explorer-unspecified-error?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-map-polygons-draw-internet-explorer-unspecified-error</link>
		<comments>http://www.anilkonsal.com/google-map-polygons-draw-internet-explorer-unspecified-error#comments</comments>
		<pubDate>Thu, 19 May 2011 10:37:34 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=56</guid>
		<description><![CDATA[if you are using jQuery to initialize google Map, do not user $(function(){ initialize()}) or $(document).ready(function(){initialize()}). Always use $(window).load(function(){ initialize() }). This worked for me.]]></description>
			<content:encoded><![CDATA[<p>if you are using jQuery to initialize google Map, do not user $(function(){ initialize()}) or $(document).ready(function(){initialize()}). </p>
<p>Always use $(window).load(function(){ initialize() }). This worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/google-map-polygons-draw-internet-explorer-unspecified-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing python 2.7.1, mysql-pythondb and PIL (python Imaging Library) on centos</title>
		<link>http://www.anilkonsal.com/installing-python-2-7-1-mysql-pythondb-and-pil-python-imaging-library-on-centos?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-python-2-7-1-mysql-pythondb-and-pil-python-imaging-library-on-centos</link>
		<comments>http://www.anilkonsal.com/installing-python-2-7-1-mysql-pythondb-and-pil-python-imaging-library-on-centos#comments</comments>
		<pubDate>Sat, 09 Apr 2011 12:01:29 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=53</guid>
		<description><![CDATA[yum -y install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-develsqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel make cd /var/tmp wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz tar xvfz Python-2.7.1.tgz cd Python-2.7.1 ./configure --prefix=/opt/python2.7.1 --with-threads --enable-shared make make install touch /etc/ld.so.conf.d/opt-python2.7.1.conf echo "/opt/python2.7.1/lib/" &#62;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
yum -y install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-develsqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel make</p>
<p>cd /var/tmp</p>
<p>wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz</p>
<p>tar xvfz Python-2.7.1.tgz</p>
<p>cd Python-2.7.1</p>
<p>./configure --prefix=/opt/python2.7.1 --with-threads --enable-shared</p>
<p>make</p>
<p>make install<br />
touch /etc/ld.so.conf.d/opt-python2.7.1.conf</p>
<p>echo "/opt/python2.7.1/lib/" &gt;&gt; /etc/ld.so.conf.d/opt-python2.7.1.conf</p>
<p>ldconfig<br />
ln -sf /opt/python2.7.1/bin/python /usr/bin/python2.7<br />
cd /var/tmp</p>
<p>wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg</p>
<p>sh setuptools-0.6c11-py2.7.egg --prefix=/opt/python2.7.1<br />
/opt/python2.7.1/bin/easy_install pip</p>
<p>ln -sf /opt/python2.7.1/bin/pip /usr/bin/pip<br />
pip install virtualenv</p>
<p>ln -sf /opt/python2.7.1/bin/virtualenv /usr/bin/virtualenv<br />
echo "alias python=/opt/python2.7.1/bin/python" &gt;&gt; ~/.bash_profile</p>
<p>echo "alias python2.7=/opt/python2.7.1/bin/python" &gt;&gt; ~/.bash_profile</p>
<p>echo "PATH=$PATH:/opt/python2.7.1/bin" &gt;&gt; ~/.bash_profile</p>
<p>source ~/.bash_profile<br />
# install mysql python db</p>
<p>cd /var/tmp</p>
<p>pip install http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download</p>
<p>#install PIL</p>
<p>yum install libjpeg freetype</p>
<p>pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/installing-python-2-7-1-mysql-pythondb-and-pil-python-imaging-library-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Credit card encryption and storage</title>
		<link>http://www.anilkonsal.com/credit-card-encryption-and-storage?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=credit-card-encryption-and-storage</link>
		<comments>http://www.anilkonsal.com/credit-card-encryption-and-storage#comments</comments>
		<pubDate>Sun, 13 Mar 2011 10:50:31 +0000</pubDate>
		<dc:creator>Anil Konsal</dc:creator>
				<category><![CDATA[MySql]]></category>

		<guid isPermaLink="false">http://anilkonsal.com/?p=52</guid>
		<description><![CDATA[Despite the recomendations of PCI DSS for not storing the credit card data in database, you have to do this because on the client&#8217;s requirements. Its quite tough decision for the developer to choose the [...]]]></description>
			<content:encoded><![CDATA[<p>Despite the recomendations of PCI DSS for not storing the credit card data in database, you have to do this because on the client&#8217;s requirements. Its quite tough decision for the developer to choose the encryption method for the credit card data. </p>
<p>Based on my experience I came to this point that one should leave the encryption on the DBMS used. Most of the DBMSes are capable enough to provide the strong encryption. For example, MySQL provides functions AES_ENCRYPT and AES_DECRYPT which take a secret keyphrase and envcrypt the provided data. </p>
<p>My experince with PHP encryption using mcrypt extension and then savin in DB has not been so smooth as some times it works but some times you get squares and diamond shaped characters when decryption takes place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anilkonsal.com/credit-card-encryption-and-storage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

