<?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>Bin-Blog &#187; MySQL</title>
	<atom:link href="http://www.bin-co.com/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Error Connecting to MySQL using Ruby on Rails in Linux &#8211; and its Solution</title>
		<link>http://www.bin-co.com/blog/2009/04/error-connection-mysql-ruby-rails-linux-solution/</link>
		<comments>http://www.bin-co.com/blog/2009/04/error-connection-mysql-ruby-rails-linux-solution/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 18:22:52 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[troubleshoot]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=249</guid>
		<description><![CDATA[I am currently working on a new Rails project. Its been a while since I worked with rails - so I updated Rails using the command '<code>sudo gem update --system</code>'. I started the inbuilt server and tried to open a page - and to my surprise, I found that <strong class="highlight">Rails is having trouble connecting to the MySQL</strong> server. It was apparent that the <strong class="highlight">mysql gem was missing</strong>. So I tried to install it using the command '<code>sudo gem install mysql</code>'. That failed too - this is the error I got...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/05/ruby_logo.gif" alt="Ruby Logo" title="Ruby Logo" width="105" height="109" class="alignnone size-full wp-image-105 intro" align="right" /></p>
<p class="intro">I am currently working on a new Rails project. Its been a while since I worked with rails &#8211; so I updated Rails using the command &#8216;<code>sudo gem update --system</code>&#8216;. I started the inbuilt server and tried to open a page &#8211; and to my surprise, I found that <strong class="highlight">Rails is having trouble connecting to the MySQL</strong> server. It was apparent that the <strong class="highlight">mysql gem was missing</strong>. So I tried to install it using the command &#8216;<code>sudo gem install mysql</code>&#8216;. That failed too &#8211; this is the error I got&#8230;</p>
<pre>Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-mysql-config
        --without-mysql-config
        --with-mysql-dir
        --without-mysql-dir
        --with-mysql-include
        --without-mysql-include=${mysql-dir}/include
        --with-mysql-lib
        --without-mysql-lib=${mysql-dir}/lib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-mlib
        --without-mlib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-zlib
        --without-zlib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-socketlib
        --without-socketlib
        --with-mysqlclientlib
        --without-mysqlclientlib
        --with-nsllib
        --without-nsllib
        --with-mysqlclientlib
        --without-mysqlclientlib

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out</pre>
<p>After a couple of hours on Google, I managed to fix the issue &#8211; and I am posting the solution here for others who might run into the same problem.</p>
<h2>Install the necessary Libraries</h2>
<p>First, you must <strong class="highlight">install a couple of mysql libraries</strong>(I am assuming that you have MySQL server already installed). If you are on <strong class="highlight">Red Hat/Fedora/CentOS</strong> etc., run the command&#8230;</p>
<pre><code class="cli">sudo yum install ruby-mysql mysql-devel</code></pre>
<p>If you are on <strong class="highlight">Debian/Ubuntu</strong>/etc., run this command&#8230;</p>
<pre><code class="cli">sudo apt-get install libmysqlclient15-dev libmysqlclient15off libmysql-ruby</code></pre>
<h2>Install the gem</h2>
<p>Once the installation is done, enter this <strong class="highlight">command to install mysql gem</strong>&#8230;</p>
<pre><code class="cli">sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config</code></pre>
<p>If your mysql_config is not in the standard location, update the command with the right path.</p>
<p>The mysql gem should be installed now. These commands worked for me &#8211; your milage may vary. If you still have trouble, try one of the following links&#8230;</p>
<h2>More Resources</h2>
<ul>
<li><a href="http://rails.aizatto.com/2007/05/19/connecting-to-mysql-using-ruby/">Connecting To MySQL using Ruby</a></li>
<li><a href="http://wiki.rubyonrails.org/database-support/mysql">MySQL =&gt; Rails Wiki</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2009/04/error-connection-mysql-ruby-rails-linux-solution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mastering phpMyAdmin: A Review</title>
		<link>http://www.bin-co.com/blog/2008/11/mastering-phpmyadmin-a-review/</link>
		<comments>http://www.bin-co.com/blog/2008/11/mastering-phpmyadmin-a-review/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 18:12:20 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=205</guid>
		<description><![CDATA[Some time ago, I was approched by the publisher of the book to write a review of their book '<a href="http://www.amazon.com/gp/product/1847194184?ie=UTF8&#38;tag=binnva-20&#38;linkCode=as2&#38;camp=1789&#38;creative=9325&#38;creativeASIN=1847194184">Mastering phpMyAdmin 2.11 for Effective MySQL Management by Marc Delisle</a><img src="http://www.assoc-amazon.com/e/ir?t=binnva-20&#38;l=as2&#38;o=1&#38;a=1847194184" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />[Affliate link]'. This got a bit delayed because of the <a href="http://www.bin-co.com/blog/2008/11/eventr-wordpress-plugin/">plugin week</a>. But I managed to finish the book today - so here is the review. Bottom line - most people are using phpMyAdmin for only the most basic operations(editing data, import, export, etc.). If you are one of them, you don't need the book - you already know all you need to know about phpMyAdmin. But <strong class="highlight">other(like me) use it for advanced purposes - to manage MySQL, create database/tables, run queries, etc. I would recommend you get this book. It covers everything from basic usage(which is a bit boring and should be skipped over) to advanced stuff(like designer view, configuration options, triggers, innoDB relation options etc.)</strong>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/11/phpmyadmin.png" alt="" title="phpMyAdmin" width="202" height="130" class="alignnone size-full wp-image-206 intro" align="right" /></p>
<p class="intro">Some time ago, I was approached by the publisher of the book to write a review of their book &#8216;<a href="http://www.amazon.com/gp/product/1847194184?ie=UTF8&amp;tag=binnva-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847194184">Mastering phpMyAdmin 2.11 for Effective MySQL Management by Marc Delisle</a><img src="http://www.assoc-amazon.com/e/ir?t=binnva-20&amp;l=as2&amp;o=1&amp;a=1847194184" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />[Affiliate link]&#8216;. This got a bit delayed because of the <a href="http://www.bin-co.com/blog/2008/11/eventr-wordpress-plugin/">plugin week</a>. But I managed to finish the book today &#8211; so here is the review. Bottom line &#8211; most people are using phpMyAdmin for only the most basic operations(editing data, import, export, etc.). If you are one of them, you don&#8217;t need the book &#8211; you already know all you need to know about phpMyAdmin. But <strong class="highlight">other(like me) use it for advanced purposes &#8211; to manage MySQL, create database/tables, run queries, etc. I would recommend you get this book. It covers everything from basic usage(which is a bit boring and should be skipped over) to advanced stuff(like designer view, configuration options, triggers, innoDB relation options etc.)</strong></p>
<p><iframe src="http://rcm.amazon.com/e/cm?t=binnva-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1847194184&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>Its an interesting book &#8211; I found it <strong class="highlight">easily readable if you skip over the basic stuff</strong>. If you think you already know what a section is talking about, skip over to the next section &#8211; that way, you will not be bored. Because it covers the basics in a fairly comprehensive way(think two screenshots per page(!), most of the things in the book you might already know. But there will be some interesting new tips as well. Some tips I found out by reading the book&#8230;.</p>
<ul>
<li>In the phpMyAdmin forms(like say, table creation form or row editing form), you can use the Ctrl+Arrow key combination to move the focus around.</li>
<li>If you create a Query bookmark with the same name as a table, that query will be used when you hit the &#8216;Browse&#8217; tab.</li>
<li>If you are using a blob to store images within the database, there is a way to show the image(Browser Transformations, Chapter 16) in the browse view.</li>
<li>And more&#8230;</li>
</ul>
<p>These are the chapters you should definitely read &#8211; some great tips can be found there&#8230;</p>
<ul>
<li>Chapter 11: Relational System</li>
<li>Chapter 14: Bookmarks</li>
<li>Chapter 16: MIME-Based Transformations</li>
<li>Chapter 18: MySQL 5 Features</li>
</ul>
<h2>Table of Contents</h2>
<p>This should give you an idea of what to expect&#8230;</p>
<ul>
<li><strong>Preface</strong></li>
<li><strong>Chapter 1: Introducing phpMyAdmin</strong>
<ul>
<li>PHP and MySQL: The Leading Open-Source Duo</li>
<li>What is phpMyAdmin?</li>
<li>History</li>
<li>Awards</li>
<li>phpMyAdmin Features Summary</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 2: Installing phpMyAdmin</strong>
<ul>
<li>System Requirements</li>
<li>Downloading the Files</li>
<li>Installation</li>
<li>First Connection Configuration</li>
<li>Multi-Server Configuration</li>
<li>Advanced Authentication</li>
<li>Security</li>
<li>Upgrading phpMyAdmin</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 3: Interface Overview</strong>
<ul>
<li>Panels and Windows</li>
<li>Language Selection</li>
<li>Themes</li>
<li>Left Panel</li>
<li>Right Panel</li>
<li>Query Window</li>
<li>Site-Specific Header and Footer</li>
<li>MySQL Documentation Links</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 4: First Steps</strong>
<ul>
<li>Database Creation</li>
<li>Creating Our First Table</li>
<li>Manual Data Insertion</li>
<li>Browse Mode</li>
<li>Creating an Additional Table</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 5: Changing Data</strong>
<ul>
<li>Edit Mode</li>
<li>Multi-Row Editing</li>
<li>Editing the Next Row</li>
<li>Deleting Data</li>
<li>Deleting Tables</li>
<li>Deleting Databases</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 6: Changing Table Structures</strong>
<ul>
<li>Adding a Field</li>
<li>Editing Field Attributes</li>
<li>TEXT</li>
<li>BLOB (Binary Large Object) Fields</li>
<li>ENUM and SET</li>
<li>DATE, DATETIME, and TIMESTAMP</li>
<li>Bit</li>
<li>Index Management</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 7: Exporting Structure and Data</strong>
<ul>
<li>Dumps, Backups, and Exports</li>
<li>Database Exports</li>
<li>Table Exports</li>
<li>Selective Exports</li>
<li>Multi-Database Exports</li>
<li>Saving the Export File on the Server</li>
<li>Memory Limits</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 8: Importing Structure and Data</strong>
<ul>
<li>Limits for the Transfer</li>
<li>Importing SQL Files</li>
<li>Importing CSV Files</li>
<li>Web Server Upload Directories</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 9: Searching Data</strong>
<ul>
<li>Single-Table Searches</li>
<li>Complete Database Search</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 10: Table and Database Operations</strong>
<ul>
<li>Table Maintenance</li>
<li>Changing Table Attributes</li>
<li>Renaming, Moving, and Copying Tables</li>
<li>Multi-Table Operations</li>
<li>Database Operations</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 11: The Relational System</strong>
<ul>
<li>Relational MySQL?</li>
<li>Linked-Tables Infrastructure</li>
<li>Defining Relations with the Relation View</li>
<li>Defining Relations with the Designer</li>
<li>Benefits of the Defined Relations</li>
<li>Column-Commenting</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 12: Entering SQL Commands</strong>
<ul>
<li>The SQL Query Box</li>
<li>The Query Window</li>
<li>Multi-Statement Queries</li>
<li>Pretty Printing (Syntax-Highlighting)</li>
<li>The SQL Validator</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 13: The Multi-Table Query Generator</strong>
<ul>
<li>Choosing Tables</li>
<li>Column Criteria</li>
<li>Automatic Joins</li>
<li>Executing the Query</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 14: Bookmarks</strong>
<ul>
<li>Creating a Bookmark after a Successful Query</li>
<li>Storing a Bookmark before Sending a Query</li>
<li>Multi-Query Bookmarks</li>
<li>Recalling from the Bookmarks List</li>
<li>Public Bookmarks</li>
<li>The Default Initial Query for a Table</li>
<li>Bookmark Parameters</li>
<li>Executing Bookmarks by Browsing the pma_bookmark Table</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 15: System Documentation</strong>
<ul>
<li>The Database Print View</li>
<li>The Selective Database Print View</li>
<li>The Table Print View</li>
<li>The Data Dictionary</li>
<li>Relational Schema in PDF</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 16: MIME-Based Transformations</strong>
<ul>
<li>The MIME Column&#8217;s Settings</li>
<li>Requirements for Image Generation</li>
<li>Examples of Transformations</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 17: Character Sets and Collations</strong>
<ul>
<li>Language Files and UTF-8</li>
<li>Versions of MySQL Prior to 4.1.x</li>
<li>MySQL 4.1.x and Later</li>
<li>Kanji Support</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 18: MySQL 5.0 Features</strong>
<ul>
<li>Observations on the History of MySQL 5.</li>
<li>Views</li>
<li>Routines: Stored Procedures and Functions</li>
<li>Triggers</li>
<li>Information_schema</li>
<li>Profiling</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 19: MySQL Server Administration</strong>
<ul>
<li>Entering the Server View</li>
<li>Database Information</li>
<li>Server Operations</li>
<li>Summary</li>
</ul>
</li>
<li><strong>Chapter 20: Troubleshooting and Support</strong>
<ul>
<li>System Requirements</li>
<li>Base Configuration</li>
<li>Solving Common Errors</li>
<li>Seeking Support</li>
<li>Contributing to the Project</li>
<li>Future phpMyAdmin Versions</li>
<li>Summary</li>
<li>Index</li>
</ul>
<p>A final advice before leaving &#8211; buy the <a href="http://www.wordspy.com/1996/09/dead-tree-editi.html">dead tree edition</a> if possible. The ebook(PDF) has DRM which makes it very hard to read. You have to <strong class="highlight">enter the password every single time you open</strong> the file. Its really annoying after a while.</p>
<h2>My Other phpMyAdmin Posts</h2>
<ul>
<li><a href="http://binnyva.blogspot.com/2006/08/installing-phpmyadmin-28.html">Installing phpMyAdmin 2.8</a></li>
<li><a href="http://binnyva.blogspot.com/2006/08/phpmyadmin-tips-and-tricks-database.html">phpMyAdmin Tips and Tricks &#8211; Database Backup and Restore</a></li>
<li><a href="http://binnyva.blogspot.com/2006/08/installing-and-configuring-phpmyadmin.html">Installing and Configuring phpMyAdmin</a></li>
<li><a href="http://binnyva.blogspot.com/2006/08/managing-databases-with-mysql-clients.html">Managing Databases with MySQL Clients &#8211; phpMyAdmin</a></li>
</ul>
<h2>Related Links</h2>
<ul>
<li><a href="http://www.packtpub.com/files/Mastering-phpMyAdmin-2-11-for-Effective-MySQL-Management-Sample-Chapter-Chapter-Table-and-Database-Operations.pdf">Sample Chapter: Table and Database Operations</a></li>
<li><a href="http://www.packtpub.com/phpmyadmin-3rd-edition/book">Mastering phpMyAdmin Book Details</a></li>
<li><a href="http://verens.com/archives/2008/04/26/review-mastering-phpmyadmin-211-for-effective-mysql-management/">review: Mastering phpMyAdmin 2.11 for Effective MySQL Management</a></li>
<li><a href="http://blogs.linux.ie/kenguest/2008/05/12/book-review-mastering-phpmyadmin-211-for-effective-mysql-management-by-marc-delisle/">Book review: “Mastering phpMyAdmin 2.11 for Effective MySQL Management” by Marc Delisle</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/11/mastering-phpmyadmin-a-review/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Remote Database Backup WordPress Plugin</title>
		<link>http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/</link>
		<comments>http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 16:43:10 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=135</guid>
		<description><![CDATA[My second WordPress Plugin - <a href="http://www.bin-co.com/tools/wordpress/plugins/db_backup/">Remote Database Backup</a>. Its is based on the <a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup plugin</a>. If you are a regular wordpress user, you might be better off using WordPress Database Backup plugin instead of my version. But if you, like me, have a local server on your system and has a copy of your site on the local server as well as the online server, you will find great use for my plugin.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/10/wordpress_logo.png" alt="" title="Wordpress Logo" width="183" height="145" class="alignnone size-full wp-image-136 intro" align="right" /></p>
<p class="intro">I have released my second WordPress Plugin &#8211; <a href="http://www.bin-co.com/tools/wordpress/plugins/db_backup/">Remote Database Backup</a>. Its is based on the <a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup plugin</a>. If you are a regular wordpress user, you might be better off using WordPress Database Backup plugin instead of my version. But if you, like me, have a local server on your system and has a copy of your site on the local server as well as the online server, you will find great use for my plugin.</p>
<p>My plugin is designed to make it possible to remotely create and download wordpress database backup in form of SQL dumps. You can then use these dumps to sync the local version of your site with the online version.</p>
<p><img src="http://www.bin-co.com/tools/wordpress/plugins/db_backup/db_backup.png" alt="Remote Database Backup Screenshot" /></p>
<h2>Backuping your WordPress Database</h2>
<ul>
<li>Install Remote Database Backup Plugin in WordPress</li>
<li>Login to WordPress site</li>
<li>Go to the Backup Page(Manage &gt; DB Backup)</li>
<li>Create a backup</li>
<li>Download the backup file to your system</li>
</ul>
<h3>Sync With Local Server</h3>
<p>And if you have a local version of your site, you can sync it with the online site using the backup file. Just follow these steps&#8230;</p>
<ul>
<li>Extract the backup file(its in the tar.gz format)</li>
<li><a href="http://txt.binnyva.com/2007/03/mysql-database-backuprestore/">Import it into your mysql database</a>.</li>
<li>Make some changes to the database(like set the home url) so that wordpress works locally</li>
</ul>
<h2>Automation Script</h2>
<p>You can do all these steps manually &#8211; or you can use the <a href="http://www.bin-co.com/blog/wp-content/uploads/2008/10/backup.txt">automation script</a> I have cooked up. You need PHP installed in your system for this to work(I assume you already have PHP if you have a local version of wordpress).</p>
<p>To use the script, first install the plugin. Then download <a href="http://www.bin-co.com/blog/wp-content/uploads/2008/10/backup.txt">the script</a> and rename it to &#8216;backup.php&#8217;(the extension must be &#8216;php&#8217; instead of &#8216;txt&#8217;. Now open it in your favorite editor and change the variables to match your site. You can run it by opening a terminal/command prompt and navigating to that folder and executing the command &#8216;php backup.php&#8217;. This will automatically make a backup and sync it with your local database.</p>
<h2>Need Feedback</h2>
<p>Let me know how it works for you if you are installing the plugin &#8211; its the first release &#8211; so I need some feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Compile and Install a LAMP(Linux/Apache/MySQL/PHP) Server from Source</title>
		<link>http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/</link>
		<comments>http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 18:00:07 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=132</guid>
		<description><![CDATA[In the last post, I described the method to install a LAMP server using apt in debian. But in some occasions, we need the latest build of the software - then we have to install it from source.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/lava_lamp.jpg" alt="LAMP - Linux, Apache, MySQL, PHP" title="LAMP - Linux, Apache, MySQL, PHP" width="232" height="294" class="size-full wp-image-128 intro" align="right" /></p>
<p class="intro">In the last post, I described the method to <a href="http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/">install a LAMP server using apt in debian</a>. But in some occasions, we need the latest build of the software &#8211; then we have to install it from source.</p>
<p>Before installation, a few points to remember. These instruction are not for a production environment &#8211; this is for a development environment. Some of the commands(the <code>make install</code> commands) need root access. You can get that using this command <code>su -</code> and entering the root password at the prompt.</p>
<h2>Installing MySQL 5</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/mysql_logo.gif" alt="" title="MySQL Logo" width="150" height="98" class="alignnone size-full wp-image-127" align="right" /></p>
<p><strong class="highlight">Download MySQL source tarballs</strong> from <a href="http://dev.mysql.com/downloads/" class="external">MySQL.com</a>. Make sure that you have downloaded the latest releases. At the time of writing this, MySQL 5.0 was the latest. <strong class="highlight">Open a terminal</strong> and login as the root user. <strong class="highlight">Extract</strong> the source to some folder(say &#8216;/usr/src/mysql&#8217;).</p>
<pre><code class="cli"></code>$ mkdir /usr/src/mysql
$ cp mysql-VERSION.tar.gz /usr/src/mysql
$ cd /usr/src/mysql
$ gunzip &lt; mysql-VERSION.tar.gz | tar -xvf -
$ cd mysql-VERSION</code></pre>
<p>For added security we will create a <strong class="highlight">new user called &#8216;mysql&#8217;</strong> and use this user while running MySQL.</p>
<pre><code class="cli">$ groupadd mysql
$ useradd -g mysql mysql</code></pre>
<p>Now we will <strong class="highlight">compile and install MySQL</strong> &#8211; this will take some time.</p>
<pre><code class="cli">$ ./configure --prefix=/usr/local/mysql [add the necessary extra options here]
$ make
$ make install</code></pre>
<p>After installing, we have to <strong class="highlight">configure MySQL</strong>.</p>
<pre><code class="cli">$ cp support-files/my-medium.cnf /etc/my.cnf
$ cd /usr/local/mysql
$ bin/mysql_install_db --user=mysql
$ chown -R root  .
$ chown -R mysql lib
$ chgrp -R mysql .</code></pre>
<p>Start MySQL</p>
<pre><code class="cli">$ bin/mysqld_safe --user=mysql &amp;</code></pre>
<p>If all goes well, you will be able to <strong class="highlight">connect to the mysql server</strong> using some clients like <a href="http://www.phpmyadmin.net/home_page/" class="external">phpMyAdmin</a> or <a href="http://www.mysqlfront.de/" class="external">MySQL Frontend</a>. For testing we will use the command line client provided with MySQL. In terminal type&#8230;</p>
<pre><code class="cli">$ mysql</code></pre>
<p>Now you should see <strong class="highlight">mysql command shell</strong> &#8211; something like this&#8230;</p>
<pre><code class="cli">Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.21-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&lt;</code></pre>
<p>Here you can <strong class="highlight">run SQL command</strong> and see the returned results. Try some out&#8230;</p>
<pre><code class="mysql">SHOW DATABASES;</code></pre>
<p>That&#8217;s it &#8211; we have installed MySQL. You can <strong class="highlight">start the server</strong> using the command</p>
<pre><code class="cli">cd /usr/local/mysql ; bin/mysqld_safe --user=mysql &amp;</code></pre>
<p>If <strong class="highlight">anything went wrong</strong>, cry for sometime and then <strong class="highlight">consult the documentation</strong>.</p>
<h2>Installing Apache 2</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/apache.png" alt="" title="Apache Logo" width="230" height="90" class="alignnone size-full wp-image-126" style="right" /></p>
<p>Same as in MySQL, download the source from <a href="http://httpd.apache.org/download.cgi" class="external">Apache.org</a>. Extract to /usr/src/httpd.</p>
<pre><code class="cli">$ mkdir /usr/src/httpd
$ cp httpd-VERSION.tar.gz /usr/src/httpd
$ cd /usr/src/httpd
$ gunzip &lt; httpd-VERSION.tar.gz | tar -xvf -
$ cd httpd-VERSION</code></pre>
<p>Compile and Install&#8230;</p>
<pre><code class="cli">$ ./configure --prefix=/usr/local/apache2 [add extra options here]
$ make
$ make install</code></pre>
<p>The configure command I used is given below &#8211; you can change it if you feel like it.</p>
<pre><code class="cli">./configure --prefix=/usr/local/apache2 --enable-mime-magic --enable-expires \
--enable-headers --enable-ssl --enable-http --enable-info --enable-dir \
--enable-rewrite --enable-so</code></pre>
<p>We will hold off configuration of Apache until after the PHP installation.</p>
<h2>Installing PHP 5</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/php-logo.png" alt="" title="PHP Logo Custom" width="179" height="98" class="alignnone size-full wp-image-123" align="right" /></p>
<p>You know the drill &#8211; <strong class="highlight"><a href="http://www.php.net/downloads.php">download PHP 5</a>, extract to /usr/src/php5</strong>.</p>
<pre><code class="cli">$ mkdir /usr/src/php5
$ cp php-VERSION.tar.gz /usr/src/php5
$ cd /usr/src/php5
$ gunzip &lt; php-VERSION.tar.gz | tar -xvf -
$ cd php-VERSION</code></pre>
<p>Building PHP is a little more complicated than the other two. PHP have a lot of options, and must be customized according to your needs. You can see all the available configurations by running the command <code>./configure --help</code>. If you require more information about this, take a look at <a href="http://www.php.net/manual/en/configure.php" class="external">PHP documentation on <code>configure</code></a>.</p>
<p>My requirements may not match yours &#8211; some you have to make your own decisions here. I am providing the most basic configuration for the build&#8230;</p>
<pre><code class="cli">./configure \
--prefix=/usr/local/php5 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=shared,/usr/local/mysql [add your options here]</code></pre>
<p>You can add all your configuration to this line. The &#8211;with-apxs2 lines tells the installer where to find Apache2 executables and the &#8211;with-mysql configuration is the location of the mysql libraries. These two lines are a must.</p>
<p>This is the actual command I used&#8230;</p>
<pre><code class="cli">./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=shared,/usr/local/mysql --with-zlib --with-gettext --with-gdbm --with-sqlite</code></pre>
<p>Now to install the language&#8230;</p>
<pre><code class="cli">$ ./configure \
$ --prefix=/usr/local/php5 \
$ --with-apxs2=/usr/local/apache2/bin/apxs \
$ --with-mysql=shared,/usr/local/mysql [add your options here]
$ make
$ make install</code></pre>
<p>Now copy the php.ini file to the necessary location&#8230;</p>
<pre><code class="cli">cp php.ini-dist /usr/local/php5/lib</code></pre>
<p>Wonderful! Now we have everything we need &#8211; we just have to configure it.</p>
<h2>Configuring Apache</h2>
<p>The <strong class="highlight">Apache can be configured by editing a single text file</strong>. This file is usually located in <code>Apache_folder/conf/httpd.conf</code>. In our case this will be <code>/usr/local/apache2/conf/httpd.conf</code> . Open this file in you favorite text editor and change the following lines. Please note that some lines may be different in you apache configuration file &#8211; so if you can&#8217;t find the line when you search with the full line, try to find the line using just the identifier. For example, if you can&#8217;t find the text &#8216;<code>DocumentRoot "/usr/local/apache2/htdocs"</code>&#8216; in your httpd.conf file, search for the text &#8216;<code>DocumentRoot</code>&#8216;.</p>
<h3>Configuration Options</h3>
<p>You may want to change the document root &#8211; replace the line</p>
<pre><code>DocumentRoot "/usr/local/apache2/htdocs"</code></pre>
<p>With</p>
<pre><code>DocumentRoot "/var/www/htdocs" # Or whatever folder you want to set as the document root.</code></pre>
<p>Also change the line</p>
<pre><code>&lt;Directory "/usr/local/apache2/htdocs"&gt;</code></pre>
<p>to</p>
<pre><code>&lt;Directory "/var/www/htdocs"&gt;</code></pre>
<p>I don&#8217;t have to tell you that you can use any directory you want &#8211; you don&#8217;t have to use &#8216;/var/www/htdocs&#8217; just because I use it. If you are using another directory, make sure that you change both the above given lines to that directory.</p>
<p>If you want to use .htaccess file to configure different folders, find the line</p>
<pre><code>AllowOverride None</code></pre>
<p>inside the <code>&lt;Directory "/usr/local/apache2/htdocs"&gt; ... &lt;/Directory&gt;</code> tag and change it to </p>
<pre><code>AllowOverride All</code></pre>
<p>Since we are using PHP, and want to use index.php as the default page in a directory, we have to set that configuration option. Find the line </p>
<pre><code>DirectoryIndex index.html index.html.var</code></pre>
<p>and replace it with, say,</p>
<pre><code>DirectoryIndex index.php index.html index.html.var</code></pre>
<p>This will make sure that the index.php will be called when you try to access a directory. For example, if you try to access, say, http://localhost/ you will get a file listing. But if you put a file named &#8216;index.php&#8217; in this folder, the server will open this file when someone accesses &#8216;http://localhost/&#8217;. The order of the names are important. If there is a file called &#8216;index.php&#8217; and a file called &#8216;index.html&#8217; in the same folder, the first one(in our case index.php) will be opened.</p>
<p>Now we must associate all files with the extension &#8216;php&#8217; with the PHP scripts handler. For this find the line</p>
<pre><code>AddHandler type-map var</code></pre>
<p>and add the following line below that line &#8211; like this</p>
<pre><code>AddHandler type-map var
AddHandler php5-script	php</code></pre>
<p>Below that there is a AddType section. Add the following line to this section.</p>
<pre><code>AddType application/x-httpd-php .php</code></pre>
<h2>Start the Server</h2>
<p>You can test your installation by starting your server. Open a terminal and run the following command.</p>
<pre><code class="cli">/usr/local/apache2/bin/apachectl start</code></pre>
<p>Go to your document root(<code>/var/www/htdocs</code>) and create a php file called &#8216;info.php&#8217; and put this code inside it&#8230;</p>
<pre><code class="php">&lt;?php
php<!-- wp bugfix -->info();

</code></pre>
<p>Now open a browser and try to access <a href="http://localhost/">http://localhost/</a> &#8211; you should see a file listing page with a &#8216;info.php&#8217; in the list. Click on that link &#8211; if you see a PHP information page, your web server is setup correctly.</p>
<p>To make sure MySQL-PHP connection is working, <a href="http://www.bin-co.com/database/clients/phpmyadmin/installing_phpmyadmin.php">install phpMyAdmin</a> &#8211; or write a database connection script &#8211; whatever is easier for you.</p>
<p><strong class="highlight">Shameless Plug</strong>: If you are a Linux user, you may want to check out my <a href="http://lindesk.com/">Linux Blog &#8211; LinDesk</a> &#8211; its about Linux on the Desktop &#8211; Articles, Application Reviews and Tutorials about many aspects of Linux included configuration and scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Document Formats</title>
		<link>http://www.bin-co.com/blog/2008/04/document-formats/</link>
		<comments>http://www.bin-co.com/blog/2008/04/document-formats/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 18:20:39 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2008/04/document-formats/</guid>
		<description><![CDATA[In FLOSS circles, March 26 is celebrated as the Document Freedom Day. Document Freedom Day (DFD) is a global day for document liberation. It will be a day of grassroots effort to educate the public about the importance of Free Document Formats and Open Standards in general. This is when I realized that people actually [...]]]></description>
			<content:encoded><![CDATA[<p><img class="intro" align="right"  src='http://www.bin-co.com/blog/wp-content/uploads/2008/04/documents.jpg' alt='Documents' /></p>
<p class="intro">In FLOSS circles, March 26 is celebrated as the <a href="http://www.documentfreedom.org/">Document Freedom Day</a>. </p>
<blockquote><p>Document Freedom Day (DFD) is a global day for document liberation. It will be a day of grassroots effort to educate the public about the importance of Free Document Formats and Open Standards in general.</p></blockquote>
<p>This is when I realized that people actually use the office packages daily. I almost never use it. According to me there are three options to store text data.</p>
<ul>
<li>Plain Text</li>
<li>HTML</li>
<li>Database</li>
</ul>
<h2>Plain Text</h2>
<p>The <strong class="highlight">simplest format</strong> there is. If there is something I should remember, I just put it in a text file and save it to the desktop. I used to use it a lot earlier &#8211; but I don&#8217;t use it much nowadays due to searchability issues. There are quite a few <a href="http://ifacethoughts.net/2007/09/27/we-need-more-txt/">advantages in using the text format</a></p>
<h2>HTML</h2>
<p>If I <strong class="highlight">need any formatting in the text, I create the document in HTML</strong>. It is easier for me to create the formatting using HTML code that using WYSIWYG Word Processors(like MS Word). I write all my blog posts in HTML &#8211; perhaps the only occasion where I need formatting.</p>
<h3>Database</h3>
<p>My favorite method to store text data is in a database. I am a web developer &#8211; so I always have a Web Server and Database server running on my system &#8211; so this system is perfect for me. </p>
<h3>Interface</h3>
<p>Remove that scared look on your face &#8211; I don&#8217;t use <a href="http://binnyva.blogspot.com/2006/08/managing-databases-with-mysql-clients.html">phpMyAdmin</a> or any Database Administration tools as the interface to save/view the data. I use my own custom scripts or WordPress.</p>
<p>The best example of this is <a href="http://txt.binnyva.com/">txt</a>. Txt is my code snippets/commands repository. You can view the full story in the <a href="http://binnyva.blogspot.com/2007/03/saving-code-snippets-part-2.html">Saving Code Snippets</a> post.</p>
<p>That&#8217;s an online example &#8211; I also have a personal wordpress blog running in my local server. I use it to record events, purchases, store receipts etc.</p>
<h3>Advantages</h3>
<dl>
<dt>Tagging</dt>
<dd><strong class="highlight">Tagging is heaven-sent to make information more findable</strong> &#8211; any del.icio.us user should know that. I used to install Ultimate Tag Warrior to get this feature &#8211; but WordPress now supports tags natively.</dd>
<dt>Searching</dt>
<dd><strong class="highlight">Searching for data within a database is much more easier, faster and provides more relevent results</strong> than searching for the data in a collection of file. Even if you are using a file indexing software like Google Desktop Search or Beagle/<a href="http://lindesk.com/2007/04/desktop-searching-in-linux-with-recoll/">Recoll</a>(for linux users), I find database searching more easier. Another advantage of using database to search is that you can <strong class="highlight">create complex queries if you know SQL</strong>.</dd>
</dl>
<h3>Disadvantages</h3>
<dl>
<dt>Not for everyone</dt>
<dd>Let&#8217;s face it &#8211; installing and maintaining a web/database server is a tad in the geek zone. An average Joe will find it just a little bit out of their league.</dd>
<dt>Overhead</dt>
<dd>Running a web server and a database server is a bit demanding on the RAM.</dd>
<dt>Backing up a little more complicated &#8211; but easier</dt>
<dd><a href="http://txt.binnyva.com/2007/03/mysql-database-backuprestore/">Backing up the data in a Database</a> is not as straight forward as backing up files &#8211; but its actually easier if you know how.</dd>
</dl>
<h2>Online</h2>
<p>One extra method to store the data &#8211; online.  This <strong class="highlight">data is stored in a database &#8211; but you don&#8217;t have the disadvantages associated with using a database</strong>. More and more people are turning to this method now. I did not include it in the initial list because its not a data format &#8211; its more of a data storing method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/04/document-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Script for PHP</title>
		<link>http://www.bin-co.com/blog/2008/03/hello-script-for-php/</link>
		<comments>http://www.bin-co.com/blog/2008/03/hello-script-for-php/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 17:44:25 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2008/03/hello-script-for-php/</guid>
		<description><![CDATA[In the last post I introduced the concept of &#8216;Hello Script&#8217; &#8211; a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet when working with that language. I thought I can elaborate on that concept by creating Hello Scripts for all the [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">In the last post I introduced the concept of <strong>&#8216;Hello Script&#8217; &#8211; a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet</strong> when working with that language. I thought I can elaborate on that concept by creating Hello Scripts for all the languages that I am familiar with.</p>
<p>Let&#8217;s start with PHP &#8211; I already provided this as an example for the last post. Here is the entire PHP Hello Script&#8230;</p>
<pre><code class="php">
&lt;?php
// Printing(IO)
print "Hello World!\n";

// Variables, concatenation
$name = 'Binny';
$year = 2008;
print "Hello, " . $name . " - welcome to " . $year . "\n";

//If,else conditions
if ($year &gt; 2008) {
	print "Welcome to the future - yes, we have flying cars!";
}
else if($year &lt; 2008) {
	print "The past - please don't change anything. Don't step on any butterflies. And for the sake of all that's good and holy, stay away from your parents!";
}
else {
	print "Anything wrong with your time machine? You have not gone anywhere, kiddo.";
}
print "\n";

// For loop
for($i=0; $i&lt;3; $i++) {
	print "$i) Hi there!\n";
}

//Numerical Array, While
$rules = array(
	'Do no harm',
	'Obey',
	'Continue Living'
);
$i = 0;
while($i&lt;count($rules)) {
	print "Rule " . ($i+1) . " : " . $rules[$i] . "\n";
	$i++;
}

// Associated array, foreach
$associated = array(
	'hello'	=&gt;	'world',
	'foo'	=&gt;	'bar',
	'lorem'	=&gt;	'ipsum'
);
foreach($associated as $key =&gt; $value) {
	print "$key: $value\n";
}

// Using Join and Split
$csv_values = explode(',', "hello,world,how,are,you\n");
print implode(":", $csv_values);

// Function, argument, return, call
function hello($name) {
	return "Hello " . $name;
}
$hello_string = hello("Binny");

// One for the OOP fanboys - Class, members, object and stuff.
class Movie {
	public $name = '';
	public $rating = 0;

	function __construct($name) {
		$this-&gt;name = $name;
		$this-&gt;rateMovie();
	}
	function rateMovie() {
		$this-&gt;rating = (strlen($this-&gt;name) % 10) + 1; //IMDBs rating algorithm. True story!
	}

	function printMovieDetails() {
		print "Movie : {$this-&gt;name}\n";
		print "Rating : " . str_repeat('*', $this-&gt;rating) . "({$this-&gt;rating})\n\n";
	}
}
//Create the object
$ncfom = new Movie("New Country for Old Men"); //It's a sequel!
$ncfom-&gt;printMovieDetails();

// File IO
// File reading, easy method...
$contents = file_get_contents('Hello.php');
print "Hello has " . strlen($contents) . " chars\n";
// Writing to a file
$file_handle = f<span></span>open('/tmp/hello.txt', 'w');
fputs($file_handle, "Hello World");
fclose($file_handle);

// Command Executing
print `ls`; //Execute the command 'ls' and print its output
print "\n";

// Regular Expressions
$string = "Hello World";
if(preg_match('/^Hell/', $string)) print "Yup - its evil\n";
print preg_replace('/l([^l])/', "$1", $string); //Remove an 'l' from both words. Should print 'Helo Word'

/*
 * Specialized code
 */
// Database connectivity(native)
mysql_connect('localhost', 'root', '') or die("Cannot connect to the Database server");
mysql_select_db('Data') or die('Could not find a database called "Data"');

// Executing Query
$sql_handle = mysql_query('SELECT name,url,description FROM Comment LIMIT 1') or die('Query Error: ' . mysql_error());
while($row = mysql_fetch_assoc($sql_handle)) {
	print "Name	:	$row[name]\n";
	print "URL	:	$row[url]\n";
	print "Desc	:	$row[description]\n\n";
}
/* Just a note here - if you are going to use PHP with database in a production
 * system(and you will, trust me), use a Database abstraction layer rather than
 * the above mentioned native methods.
 */

print $_REQUEST['username']; // Method to get the value of the field 'username' after a form submit. Will not work at CLI execution
</code></pre>
<p>Save this to a file and keep it around for future reference &#8211; if you are just starting out with PHP</p>
<p>Coming up next &#8211; Python Hello Script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/03/hello-script-for-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

