<?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>Connecting the dots... &#187; development</title>
	<atom:link href="http://blog.rajatpandit.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rajatpandit.com</link>
	<description>Thoughts on Web Development, Infrastructure and Application Scalability</description>
	<lastBuildDate>Thu, 29 Dec 2011 13:21:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Setting up local environment to work with Amazon&#8217;s EC2 Infrastructure</title>
		<link>http://blog.rajatpandit.com/2011/12/22/setting-up-local-environment-to-work-with-amazons-ec2-infrastructure/</link>
		<comments>http://blog.rajatpandit.com/2011/12/22/setting-up-local-environment-to-work-with-amazons-ec2-infrastructure/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 12:22:41 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Devops]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[infrastructure]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=687</guid>
		<description><![CDATA[This post doesn&#8217;t contain anything that&#8217;s not available in the aws docs. Just this more like a note to self to remind me of the steps as everytime I have...]]></description>
			<content:encoded><![CDATA[<p>This post doesn&#8217;t contain anything that&#8217;s not available in the aws docs. Just this more like a note to self to remind me of the steps as everytime I have to setup an environment instead of digging in the documentation, I could use this a single point of information. Feel free to use it for yours a well.</p>
<ul>
<li>Create an account alias using IAM even if you are the only single user using the aws account. Helps scale out to bigger teams when you need to with better granular access controls. You can read more about it here <a href="http://aws.amazon.com/documentation/iam/">http://aws.amazon.com/documentation/iam/</a><a href="http://blog.rajatpandit.com/wp-content/uploads/2011/12/aws-account-lias.png"><img class="size-full wp-image-691 alignleft" style="margin: 10px;" title="aws-account-lias" src="http://blog.rajatpandit.com/wp-content/uploads/2011/12/aws-account-lias.png" alt="" width="444" height="166" /></a></li>
<li>The process of creating the user will generate Access Id, Secret and also the password that will be used to login to the new Alias url</li>
<li>Login via the newly created account on the account alias url and start a new project</li>
<li>IAM doesn&#8217;t create your x.509 certificates for you, so you would need to do that yourself and upload it</li>
<li>Use the following commands to generate a key for yourself
<pre class="brush: plain; title: ; notranslate">
$ openssl genrsa 1024 &gt; private-key.pem #generate private key
$ openssl req -new -key private-key.pem -out cert.pem #generate csr
$ openssl x509 -req -days 365 -in cert.pem -signkey private-key.pem -out project-cert.crt #generate the final certificate
</pre>
<p><a href="http://blog.rajatpandit.com/wp-content/uploads/2011/12/manage-signing-cert.png"><img class="alignleft  wp-image-692" style="margin: 10px;" title="manage-signing-cert" src="http://blog.rajatpandit.com/wp-content/uploads/2011/12/manage-signing-cert.png" alt="" width="491" height="290" /></a></p>
<p>From the definition in the documentation:</p>
<ul>
<li><strong>Access keys</strong>: symmetric key encryption. These are for making requests to AWS product REST or Query API. Can be obtained/regenerated from the access keys tab on the was security credentials page</li>
<li><strong>X.509 certificates</strong>: public key encryption. use x.509 certificates to make secure SOAP protocol requests to AWS service API. These are the credentials you will use when using the command-line ec2 API tools. can be obtained/regenerated from the x.509 certificates tab on the AWS Security credentials page.</li>
<li><strong>Key pairs</strong>: SSH key pairs when you create an intense amazon inserts the public key of your ssh key pairs into your new instance so that you can log in using your private key. you can add new ssh key-pairs though the AWS management console by clicking on Key Pairs.</li>
</ul>
</li>
<li>Upload the content of the crt in the popup that shows up when you click on &#8216;Managing Signing Certificates&#8217;. When finished it will give you a certificate id that can be used to reference certificates if you have more than one.</li>
<li>Update the <code>.bash_profile</code> with the new variables that the tools would use.
<pre class="brush: plain; title: ; notranslate">
export EC2_KEYPAIR=$HOME/.ec2/sa/sa-aws-keypair.pem #this is the keypair you generate/download
export EC2_PRIVATE_KEY=$HOME/.ec2/sa/private-key.pem #this is the private key used to generate the cert
export EC2_CERT=$HOME/.ec2/sa/aws-sa.crt #this is the cert you generated and uploaded
export JAVA_HOME=/usr/lib/jvm/java-6-sun
</pre>
<p>and then update your shell with the new shell variables</p>
<pre class="brush: plain; title: ; notranslate">
$source ~/.bash_profile
</pre>
</li>
<li>Obviously then you need to install the tools if you don&#8217;t have it installed already. In you are using ubuntu you need to enable some repositories. Edit <code>/etc/apt/sources.list</code> and uncomment the following lines:
<pre class="brush: plain; title: ; notranslate">
#deb http://gb.archive.ubuntu.com/ubuntu/ maverick multiverse
#deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick multiverse
#deb http://gb.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
#deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
</pre>
<p>and then update and install</p>
<pre class="brush: plain; title: ; notranslate">
rp@supernova:~$ sudo apt-get update &amp;&amp; sudo apt-get install ec2-ami-tools ec2-api-tools
</pre>
</li>
<li>Now test the configuration
<pre class="brush: plain; title: ; notranslate">
$ ec2-describe-images -o amazon
</pre>
<p>if you see some results come back you are pretty much setup.</li>
</ul>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2011/12/22/setting-up-local-environment-to-work-with-amazons-ec2-infrastructure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mass Virtual Host using VirtualDocumentRoot</title>
		<link>http://blog.rajatpandit.com/2009/10/17/mass-virtual-host-using-virtualdocumentroot/</link>
		<comments>http://blog.rajatpandit.com/2009/10/17/mass-virtual-host-using-virtualdocumentroot/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 12:26:31 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache 2]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[VirtualDocumentRoot]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=360</guid>
		<description><![CDATA[Recently I required to update my development environment such that I can quickly setup virtual hosts, without needing to update the httpd.conf file everytime. It turns out that Apache supports...]]></description>
			<content:encoded><![CDATA[<p>Recently I required to update my development environment such that I can quickly setup virtual hosts, without needing to update the httpd.conf file everytime. It turns out that <a href="http://httpd.apache.org">Apache</a> supports a directive called <code>VirtualDocumentRoot</code> which allows you the map your host directories based on the domain name.<br />
I wanted to setup domains like <code>project-name.user-name.devserver.name</code>, hence following is the settings I used to get that setup. So using the following configuration domain name I can use is <code>secret.rp.mydevserver.com</code> and the code for it is located at /websites/rp/secret/web assuming I am using <a href="http://symfony-project.org">symfony</a> (hence the web directory)</p>
<pre class="brush: bash; title: ; notranslate">
ServerAdmin rajat_pandit@ipcmedia.com
CustomLog /var/log/apache2/dynamic.log cookie
ErrorLog /var/log/apache2/dynamic.error.log
RewriteLogLevel 0
RewriteLog /var/log/apache2/dynamic.rewrite.log

DocumentRoot /websites
UseCanonicalName off

VirtualDocumentRoot /websites/%2/%1/web
AllowOverride All

RewriteEngine On
</pre>
<p>More details can be found at <a href="http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html#examples">http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html#examples</a></p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/10/17/mass-virtual-host-using-virtualdocumentroot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP CodeSniffer and common errors</title>
		<link>http://blog.rajatpandit.com/2009/10/01/php-code-sniffer-and-common-errors/</link>
		<comments>http://blog.rajatpandit.com/2009/10/01/php-code-sniffer-and-common-errors/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 14:06:29 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Clean]]></category>
		<category><![CDATA[code sniffer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[phpcs]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=382</guid>
		<description><![CDATA[I am currently writing a wrapper for PHPUnit for my employer which makes writing Selenium test cases for developers far easier. It would abstract them from the details of knowing...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-384" title="sniffer11a" src="http://blog.rajatpandit.com/wp-content/uploads/2009/10/sniffer11a.jpg" alt="sniffer11a" width="322" height="193" />I am currently writing a wrapper for <a href="http://phpunit.de">PHPUnit</a> for my <a href="http://ipcmedia.com">employer</a> which makes writing <a href="http://seleniumhq.org/">Selenium</a> test cases for developers far easier. It would abstract them from the details of knowing server, urls, browser versions, reporting etc. All they now need to do is just write a basic test case for the functionality they added in the sprint and then potentially this can be added into hudson for continuous  integration. This was interesting and requires a blog post to document the classes I extended. However this post is more about the next steps. This also would be a great help for the testing team to amass regression suite written by the developer itself, which if done properly would be of the highest quality.</p>
<p>So the next step was to make a pear package out of it so that other projects could extend out of it and also to free the developer of the include path hell that php offers and as part of the exercise, I ran my code past php code sniffer. However good the tool is, its lacking on part of documentation (or atleast i couldn&#8217;t find much) and its obscure error messages only meant that I would have to dig into the code to find out what exactly it was looking for. So here are some of them of the obscure ones:</p>
<pre class="brush: bash; title: ; notranslate">
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AND 0 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 2 | ERROR | Missing file doc comment
 2 | ERROR | Missing class doc comment
--------------------------------------------------------------------------------
</pre>
<p>There isn&#8217;t any documentation that points out what it actually means with file document and class document. It turns out that it needs documentation about the class as well as the class, usually the same if there is only one level. Here is what I put in my class file to satisfy that.</p>
<pre class="brush: php; title: ; notranslate">
/**
* IPC_Test_Config
*
*
* @category Testing
* @package  IPC.Test
* @author   Rajat Pandit &lt;rajat_pandit@lalaland.com&gt;
* @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @link     http://ipcmedia.com
*/
/**
* IPC_Test_Config
*
* @category Testing
* @package  IPC.Test
* @author   Rajat Pandit &lt;rajat_pandit@lalaland.com&gt;
* @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @link     http://ipcmedia.com
*/
</pre>
<p>Here&#8217;s the next one:</p>
<pre class="brush: bash; title: ; notranslate">
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 10 | WARNING | PHP version not specified
--------------------------------------------------------------------------------
</pre>
<p>Now typically you would expect another @tag but its just <code>* PHP version 5</code> that you need to add. This is what the final version looks like:</p>
<pre class="brush: php; title: ; notranslate">
/**
* IPC_Test_Config
*
* PHP version 5
*
* @category Testing
* @package  IPC.Test
* @author   Rajat Pandit &lt;rajat_pandit@ipcmedia.com&gt;
* @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @link     http://ipcmedia.com
*/
/**
* IPC_Test_Config
*
* @category Testing
* @package  IPC.Test
* @author   Rajat Pandit &lt;rajat_pandit@ipcmedia.com&gt;
* @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @link     http://ipcmedia.com
*/
class IPC_Test_Config
</pre>
<p>I hope this post if useful for anyone who wants to use a code sniffer to ensure that the quality of code is kept to its highest.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/10/01/php-code-sniffer-and-common-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony development process</title>
		<link>http://blog.rajatpandit.com/2009/07/11/symfony-development-process/</link>
		<comments>http://blog.rajatpandit.com/2009/07/11/symfony-development-process/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 10:48:55 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=345</guid>
		<description><![CDATA[My development process involves using doctrine and svn. Documenting my development steps to make sure I can put this is some sort of build script in future. Creating svn directories...]]></description>
			<content:encoded><![CDATA[<p>My development process involves using <a href="http://www.doctrine-project.org/">doctrine</a> and <a href="http://subversion.tigris.org/">svn</a>. Documenting my development steps to make sure I can put this is some sort of build script in future.</p>
<p>Creating svn directories</p>
<pre class="brush: bash; title: ; notranslate">
svn mkdir -m &quot;create default directories&quot; http://svn.clients.rajatpandit.com/project-name/trunk http://svn.clients.rajatpandit.com/project-name/tags http://svn.clients.rajatpandit.com/project-name/branches
</pre>
<p>Checkout these directories locally:</p>
<pre class="brush: bash; title: ; notranslate">
svn co http://svn.clients.rajatpandit.com/project-name/ .
</pre>
<p>Move to the <code>trunk</code> directory</p>
<pre class="brush: bash; title: ; notranslate">
cd trunk
</pre>
<p>Creating a new project</p>
<pre class="brush: bash; title: ; notranslate">
$  symfony generate:project brp
$ php symfony generate:app --escaping-strategy=on --csrf-secret=s3cr3t fe
</pre>
<p>Clear cache and log and add that to svn</p>
<pre class="brush: bash; title: ; notranslate">
rm -rf cache/* log/*
chmod 777 cache/ log/
svn add *
</pre>
<pre class="brush: bash; title: ; notranslate">
svn propedit svn:ignore cache
svn propedit svn:ignore log
</pre>
<p>Enter * in both the cases so that no files in cache and log get commited to svn</p>
<p>Add the new files to svn</p>
<pre class="brush: bash; title: ; notranslate">
svn ci -m 'adding the initial set of files'
</pre>
<p>Update the database settings, add the doctrine plugin and disable the propel plugin instead, edit the file <code>config/ProjectConfiguration.class.php</code><br />
and update the line with the following line:</p>
<pre class="brush: php; title: ; notranslate">
  $this-&gt;enableAllPluginsExcept(array('sfPropelPlugin', 'sfCompat10Plugin'));
</pre>
<p>Publish the plug-in assets</p>
<pre class="brush: bash; title: ; notranslate">
rp@devbox:~/websites/project-name/trunk$ php symfony plugin:publish-assets
    plugin    Configuring plugin - sfProtoculousPlugin
    plugin    Configuring plugin - sfDoctrinePlugin
</pre>
<p>Delete the files for the propel plugin:</p>
<pre class="brush: bash; title: ; notranslate">
svn delete web/sfPropelPlugin
svn delete config/propel.ini
svn delete config/schema.yml
svn mkdir config/doctrine
</pre>
<p>Create new schema file and remove the default schema file.</p>
<pre class="brush: bash; title: ; notranslate">
rp@devbox:~/websites/project-name/trunk$ cd config/doctrine/
rp@devbox:~/websites/project-name/trunk/config/doctrine$ touch schema.yml
rp@devbox:~/websites/project-name/trunk/config/doctrine$ svn add schema.yml
A         schema.yml
rp@devbox:~/websites/project-name/trunk/config/doctrine$ svn ci -m 'adding schema for app'

svn delete config/databases.yml
svn ci -m 'removed the default databases.yml file'
</pre>
<p>Add database configuration settings:</p>
<pre class="brush: bash; title: ; notranslate">
php symfony configure:database --name=doctrine --class=sfDoctrineDatabase &quot;mysql:host=127.0.0.1;dbname=project1&quot; root password
</pre>
<p>Link to externals so that the  latest version of the plugins and symfony gets checked out:</p>
<pre class="brush: bash; title: ; notranslate">
cd lib/
svn mkdir vendor
svn propedit svn:externals lib/vendor
svn ci -m 'updating symfony to version 1.2.7'
svn update lib/vendor/
</pre>
<p>That pulls out the most updated tagged version  of <a href="http://symfony-project.org">symfony</a>.</p>
<p>Update the configuration file <code>config/ProjectConfiguration.class.php</code> to use the local <a href="http://symfony-project.org">symfony</a> version instead of the site-wide settings. </p>
<pre class="brush: php; title: ; notranslate">
require_once dirname(__FILE__) . '/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
</pre>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/07/11/symfony-development-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling HTTPS support in curl installed through MacPorts on OSX</title>
		<link>http://blog.rajatpandit.com/2009/03/31/enabling-https-support-in-curl-installed-through-macports-on-osx/</link>
		<comments>http://blog.rajatpandit.com/2009/03/31/enabling-https-support-in-curl-installed-through-macports-on-osx/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 22:27:40 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Clean]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[variants]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=250</guid>
		<description><![CDATA[While doing development just noticed that if you have installed php with curl support using macports it does&#8217;nt install ssl support in curl by default which is quite frustrating. Especially...]]></description>
			<content:encoded><![CDATA[<p>While doing development just noticed that if you have installed php with curl support using macports it does&#8217;nt install ssl support in curl by default which is quite frustrating. Especially I just spent 30mins of my life trying to debugging what had gone wrong.</p>
<p>This is what you would get if you have a similar problem:</p>
<pre class="brush: bash; title: ; notranslate">
% curl -k https://www.yahoo.com
curl: (1) Protocol https not supported or disabled in libcurl
</pre>
<p>The problem is that you would usually have something that depends on curl so you cant install the version of curl with its variant straightaway, so you will first need to remove the dependent first, then remove curl and clean up the install and then finally install curl with its ssl variant followed by its dependents.</p>
<p>The steps are something like this:</p>
<pre class="brush: bash; title: ; notranslate">
busybox:web rp$ sudo port uninstall curl @7.19.3_0 curl @7.19.3_0+ssl
---&gt;  Unable to uninstall curl 7.19.3_0, the following ports depend on it:
---&gt;  	php5
Error: port uninstall failed: Please uninstall the ports that depend on curl first.
busybox:web rp$ sudo port uninstall curl @7.19.3_0 curl @7.19.3_0+ssl
busybox:web rp$ sudo port uninstall php5
---&gt;  Deactivating php5 @5.2.9_0+apache2+macosx+mysql5+pear+sqlite
---&gt;  Uninstalling php5 @5.2.9_0+apache2+macosx+mysql5+pear+sqlite
busybox:web rp$ sudo port uninstall curl @7.19.3_0 curl @7.19.3_0+ssl
---&gt;  Deactivating curl @7.19.3_0
---&gt;  Uninstalling curl @7.19.3_0
---&gt;  Uninstalling curl @7.19.3_0+ssl
busybox:web rp$ sudo port install php5 @5.2.9_0+apache2+macosx+mysql5+pear+sqlite
Error: Requested variants do not match original selection.
Please perform 'port clean curl' or specify the force option.
Error: The following dependencies failed to build: curl
Error: Status 1 encountered during processing.
busybox:web rp$ sudo port clean curl
---&gt;  Cleaning curl
busybox:web rp$ sudo port clean php5
---&gt;  Cleaning php5
busybox:web rp$ sudo port clean php5
---&gt;  Cleaning php5
busybox:web rp$ sudo port clean curl
---&gt;  Cleaning curl
busybox:web rp$ sudo port clean php5
busybox:web rp$ sudo port install curl +ssl
---&gt;  Fetching curl
---&gt;  Verifying checksum(s) for curl
---&gt;  Extracting curl
---&gt;  Configuring curl
---&gt;  Building curl
---&gt;  Staging curl into destroot
---&gt;  Installing curl @7.19.3_0+ssl
---&gt;  Activating curl @7.19.3_0+ssl
---&gt;  Cleaning curl
busybox:web rp$ sudo port install php5 @5.2.9_0+apache2+macosx+mysql5+pear+sqlite
---&gt;  Fetching php5
---&gt;  Verifying checksum(s) for php5
---&gt;  Extracting php5
---&gt;  Applying patches to php5
---&gt;  Configuring php5
---&gt;  Building php5
---&gt;  Staging php5 into destroot
Warning: php5 requests to install files outside the common directory structure!
---&gt;  Installing php5 @5.2.9_0+apache2+macosx+mysql5+pear+sqlite

If this is your first install, you might want
cd /opt/local/apache2/modules
/opt/local/apache2/bin/apxs -a -e -n &quot;php5&quot; libphp5.so

* copy  /opt/local/etc/php.ini-dist to  /opt/local/etc/php.ini
---&gt;  Activating php5 @5.2.9_0+apache2+macosx+mysql5+pear+sqlite
---&gt;  Cleaning php5
</pre>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/03/31/enabling-https-support-in-curl-installed-through-macports-on-osx/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>using svn for development in symfony</title>
		<link>http://blog.rajatpandit.com/2009/02/08/using-svn-for-development-in-symfony/</link>
		<comments>http://blog.rajatpandit.com/2009/02/08/using-svn-for-development-in-symfony/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 15:36:14 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bug fixes]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[directory structure]]></category>
		<category><![CDATA[dramatic changes]]></category>
		<category><![CDATA[empty directory]]></category>
		<category><![CDATA[initial directory]]></category>
		<category><![CDATA[iteration]]></category>
		<category><![CDATA[nature of the product]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[product development cycle]]></category>
		<category><![CDATA[repos]]></category>
		<category><![CDATA[secret project]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=204</guid>
		<description><![CDATA[The recent project that I am working on for a client has taught me more about svn than I ever did because of the complex nature of the product. It...]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.rajatpandit.com/wp-content/uploads/2009/02/tdgts_pile.jpg" alt="Symfony" title="Symfony" width="300" height="410" class="alignright size-full wp-image-206" />The recent project that I am working on for a client has taught me more about <code>svn</code> than I ever did because of the complex nature of the product. It has been going through a proper product development cycle which involves quick iteration of features and sometimes, such dramatic changes that can make the entire code base unstable for weeks until the change is brought about.<br />
In addition to that, I have always preferred to work with the latest version of symfony so that I am always up-to-date in terms of bug fixes and manage to provide the very best of code base.</p>
<p>I trolled through the <code>svn</code> manuals and <a href="http://stereointeractive.com/blog/2008/12/10/starting-a-new-symfony-project/">some really interesting blog posts</a> and summarizing the steps that I took to put my code base back into control. Its rather unusual that none of the steps below are anything special its just that I hadnt had to work on a situation where I had to work on a feature which might or might not see the daylight of being pushed to production. </p>
<p>So the first thing to do was to create the trunk, branches and tags directory. </p>
<pre class="brush: bash; title: ; notranslate">
$ mkdir ~/websites/secret-project/trunk \
            ~/websites/secret-project/branches \
            ~/websites/secret-project/tags
</pre>
<p>I now use <a href="http://dreamhost.com">dreamhost</a> for my svn but you can replace this with any other repo (local or remote) to manage your code. So I would start by creating the initial directory structure in the repo.</p>
<pre class="brush: bash; title: ; notranslate">
$ svn import -m 'Importing the initial directory structure' \
                http://svn.rajatpandit.com/secret-project/trunk \
                http://svn.rajatpandit.com/secret-project/branches \

http://svn.rajatpandit.com/secret-project/tags
</pre>
<p>Now checking out the empty directory locally to setup the local directories we created locally.</p>
<pre class="brush: bash; title: ; notranslate">
$ svn co http://svn.rajatpandit.com/secret-project/trunk \
               ~/websites/secret-project/trunk
</pre>
<p>The next step is to ensure that you are always using the most recent version of symfony. I like this feature about svn. You can have multiple directories pointing to multiple repos, that we can always ensure that your project can benefit from the most recent versions. We start that by setting up the lib/symfony and marking that as having an external repo.</p>
<pre class="brush: bash; title: ; notranslate">
$ cd  ~/websites/secret-project/
$ mkdir trunk/lib
$ mkdir trunk/lib/vendor
$ svn propedit svn:externals lib/vendor
symfony http://svn.symfony-project.com/tags/RELEASE_1_2_4/
</pre>
<p>(1.2.4 being the most recent release at the time of writing this post)<br />
This is a good time to commit this to the svn and get the latest code.</p>
<pre class="brush: bash; title: ; notranslate">
$ svn ci -m 'updating symfony to 1.2.4'
$ svn update lib/vendor
</pre>
<p>With the most recent codebase available in the vendors directory, now is a good time to do any sanity checks if you fancy.</p>
<pre class="brush: bash; title: ; notranslate">
php lib/vendor/symfony/data/bin/check_configuration.php
php lib/vendor/symfony/data/bin/symfony -V
</pre>
<p>If all works fine then there is one other configuration change that is required, after which you can start generating the basic stub of your code base. The change is to update the path <code>sfCoreAutoload.class.php</code> so that its picked up relative to where its placed.</p>
<pre class="brush: bash; title: ; notranslate">
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
</pre>
<p>With that done and your basic symfony apps and modules created, you can now update the svn configuration so that you can ignore the <code>cache</code> and <code>logs</code> directory.</p>
<pre class="brush: bash; title: ; notranslate">
$ rm -rf cache/*
$ rm -rf log/*
$ chmod 777 cache
$ chmod 777 log
$ svn add *
$ svn propedit svn:ignore log
$ svn propedit svn:ignore cache
$ svn ci -m &quot;updating the codebase with new apps/modules&quot;
</pre>
<p>Its also a good idea to ensure that the auto generated files dont make it to the repo, which is clearly a waste as its usually good to generate them on the server after deployment, that way you are usually sure about your configurations and settings.</p>
<pre class="brush: bash; title: ; notranslate">
svn add --non-recursive lib/model
svn add --non-recursive lib/model/om
svn add --non-recursive lib/model/map
svn propedit svn:ignore lib/model/om
svn propedit svn:ignore lib/model/map
</pre>
<p>You can also do the same for <code>forms</code> and <code>filters</code> any other auto generated file like sql files). Obviously needless to say, you need to commit your files as often as possible and tag after each release. </p>
<p>This post has been heavily adapted from a post on <a href="http://stereointeractive.com/blog/">Stereo Interactive</a> which is a blog I usually end up on when I get stuck on symfony problems. Worth reading it as well. This post would usually form as my own pointer when starting on the next project on symfony.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2009/02/08/using-svn-for-development-in-symfony/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>GIT &#8211; version control system</title>
		<link>http://blog.rajatpandit.com/2008/09/14/git-version-control-system/</link>
		<comments>http://blog.rajatpandit.com/2008/09/14/git-version-control-system/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 13:15:29 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=76</guid>
		<description><![CDATA[Having used CVS, SVN and GIT, GIT clearly seems like my preferred choice of version control system, esp for my symfony projects, its amazing how fast it is and how...]]></description>
			<content:encoded><![CDATA[<p>Having used CVS, SVN and GIT, GIT clearly seems like my preferred choice of version control system, esp for my symfony projects, its amazing how fast it is and how easy it is to use for most of the basic operations and even for other slightly complex operations like branching and merging. I have previous covered cvs commands <a href="http://blog.rajatpandit.com/2008/08/02/cvs-term-soup/">here</a> , <a href="http://blog.rajatpandit.com/2008/08/02/branching-and-merging-code-in-cvs/">here</a> and <a href="http://blog.rajatpandit.com/2008/06/03/recursively-adding-files-to-cvs/">here</a> so it seemed fair to have the git commands documented as well, its just much easier to have it all in one place as a quick start primer for anyone who is interested in playing around with it.</p>
<p>Download Information available at:<br />
<a href="http://git.or.cz/#download">http://git.or.cz/#download</a></p>
<p>Before you start, set some git variables.</p>
<pre class="brush: bash; title: ; notranslate">
# set your name and email, used for commit messages
$ git config --global user.name &quot;&quot;
$ git config --global user.email &quot;&quot;

# enable nice colorful output
$ git config --global color.diff auto
$ git config --global color.status auto
$ git config --global color.branch auto
</pre>
<p>You can see the other configuration settings using the command:</p>
<pre class="brush: bash; title: ; notranslate">
$ git config -l
</pre>
<p>Assuming you are in your working directory, initialize the repository using the command:</p>
<pre class="brush: bash; title: ; notranslate">
$ git init
</pre>
<p>and you should see the following echoed back to the screen:</p>
<pre class="brush: bash; title: ; notranslate">
Initialized empty Git repository in .git/
</pre>
<p>Now you can add all your current files to the repository using the command:</p>
<pre class="brush: bash; title: ; notranslate">
$ git add .
</pre>
<p>This is now saved in a temporary staging area which git calls the &#8216;index&#8217;, this can be made permanent by calling the following command:</p>
<pre class="brush: bash; title: ; notranslate">
$ git commit
</pre>
<p>Now you have a functional repository which you can use to track your changes. The following the basic commands for your usual daily actions.</p>
<p>Adding files to the repository:</p>
<pre class="brush: bash; title: ; notranslate">
$ git add file1 file2 file3
</pre>
<p>To see the status of the current files, modified or un added files.</p>
<pre class="brush: bash; title: ; notranslate">
$ git status
</pre>
<p>You can also see the difference in the modified files.</p>
<pre class="brush: bash; title: ; notranslate">
$ git diff --cached
</pre>
<p>Commit the file automatically (adding new files and then committing them to the index can be done using the following command:</p>
<pre class="brush: bash; title: ; notranslate">
$ git commit -a
</pre>
<p>And here are the most interesting bits, the ease of branching and merging that might make you fall in love with this.<br />
Creating a new branch:</p>
<pre class="brush: bash; title: ; notranslate">
$ git branch wacky_idea
</pre>
<p>Listing all the current branches</p>
<pre class="brush: bash; title: ; notranslate">
$ git branch

wacky_idea
* master
</pre>
<p>If you now want to work on the new branch you need to set the mode to the new branch by checking out the branch.</p>
<pre class="brush: bash; title: ; notranslate">
$ git checkout wacky_idea
</pre>
<p>Modify and commit your files using the standard <code>$git commit -a</code> and then you can merge it back into master by first checking out master and then doing the merge.</p>
<pre class="brush: bash; title: ; notranslate">
$ git checkout master
$ git merge wacky_idea
</pre>
<p>it will show you the summary in case of no conflicts or give you an opportunity to fix them before doing the merge. You obviously would need to do a <code>git commit -a</code> to add your changes to the index and then if you want to remove the branch run <code>git branch -d wacky_idea</code></p>
<p>There are loads of other interesting features that I will post back to the blog but its surely an interesting version control system. The reason I like this so much is because I do a lot of my development during travelling and by far this is the only CMS that I am aware of that allows you to work offline and online as well. There are always work around to run your repo locally on cvs but that doesn&#8217;t serve the purpose of code centralization.</p>
<p>Some interesting links for further reading:</p>
<ul>
<li><a href="http://git.or.cz/">http://git.or.cz/</a></li>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html">http://www.kernel.org/pub/software/scm/git/docs/everyday.html</a></li>
<li><a href="http://jonas.nitro.dk/git/quick-reference.html">http://jonas.nitro.dk/git/quick-reference.html</a></li>
<li> <a href="http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html">http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html</a></li>
</ul>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2008/09/14/git-version-control-system/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

