<?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>Chris Jean&#039;s Blog &#187; Linux</title>
	<atom:link href="http://chrisjean.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Mon, 30 Aug 2010 16:30:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fix &#8220;WordPress database error Table &#8230; is marked as crashed and should be repaired&#8221;</title>
		<link>http://chrisjean.com/2010/08/30/fix-wordpress-database-table-marked-crashed/</link>
		<comments>http://chrisjean.com/2010/08/30/fix-wordpress-database-table-marked-crashed/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 15:46:58 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisjean.com/?p=1823</guid>
		<description><![CDATA[All the content on my site was gone. When I went to investigate, I found my error log was filled with the following error: WordPress database error Table &#8216;./database_name/prefix_posts&#8217; is marked as crashed and should be repaired for query SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM prefix_posts  WHERE post_type = &#8216;post&#8217; [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>All the content on my site was gone. When I went to investigate, I found my error log was filled with the following error:</p>
<p class="code" style="padding-left: 30px;">WordPress database error Table &#8216;./database_name/prefix_posts&#8217; is marked as crashed and should be repaired for query SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM prefix_posts  WHERE post_type = &#8216;post&#8217; AND post_status = &#8216;publish&#8217; GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC  made by require, require_once, include, do_action, call_user_func_array, flexx_after_content, get_sidebar, locate_template, load_template, require_once, dynamic_sidebar, call_user_func_array, WP_Widget-&gt;display_callback, WP_Widget_Archives-&gt;widget, wp_get_archives</p>
<p>A very scary looking error, but it was easy to fix.</p>
<h3>My Preferred Repair Method</h3>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">user@server</span> <span style="color:#729FCF;">~/public_html</span>]$</span> <span style="color:#FFF;">mysql -u user -p</span>
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1120449
Server version: 5.1.48 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">connect database</span>
Connection id:    1120477
Current database: database

<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">select * from prefix_posts limit 1;</span>
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1120568
Current database: database

ERROR 145 (HY000): Table './database/prefix_posts' is marked as crashed and should be repaired
<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">repair table prefix_posts;</span>
+-----------------------+--------+----------+----------+
| Table                 | Op     | Msg_type | Msg_text |
+-----------------------+--------+----------+----------+
| database.prefix_posts | repair | status   | OK       |
+-----------------------+--------+----------+----------+
1 row in set (3.56 sec)

<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">select * from prefix_posts limit 1;</span>
+----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+
| ID | post_author | post_date           | post_date_gmt       | post_content | post_title | post_category | post_excerpt | post_status | comment_status | ping_status | post_password | post_name | to_ping | pinged | post_modified       | post_modified_gmt   | post_content_filtered | post_parent | guid                                                       | menu_order | post_type  | post_mime_type | comment_count |
+----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+
| 12 |           8 | 2008-05-20 10:09:49 | 2008-05-20 15:09:49 |              | 308image1  |             0 |              | inherit     | open           | open        |               | 308image1 |         |        | 2008-05-20 10:09:49 | 2008-05-20 15:09:49 |                       |           0 | http://gaarai.com/wp-content/uploads/2008/05/308image1.gif |          0 | attachment | image/gif      |             0 |
+----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+
1 row in set (0.00 sec)

<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">exit</span>
<span style="color:#FFF;">Bye</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">user@server</span> <span style="color:#729FCF;">~/public_html</span>]$</span> <span style="color:#FFF;"></span></pre>
<p>For me, this was the easiest and quickest way to repair the table.</p>
<h3>Repairing Tables with phpMyAdmin</h3>
<p>For you, you might prefer to use phpMyAdmin. Fortunately, repairing a table with phpMyAdmin is easy.</p>
<ol>
<li>Log in to your phpMyAdmin or connect to it via your cPanel back-end.</li>
<li>Select the database with the crashed table.</li>
<li>Put a checkmark next to each crashed table.</li>
<li>Select &#8220;Repair table&#8221; from the &#8220;With selected:&#8221; drop down at the bottom of the list.</li>
<li>Let phpMyAdmin do its thing.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2010/08/30/fix-wordpress-database-table-marked-crashed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix PHP 4 &#8220;Client does not support authentication protocol requested by server&#8221;</title>
		<link>http://chrisjean.com/2010/05/25/fix-php-4-client-does-not-support-authentication-protocol/</link>
		<comments>http://chrisjean.com/2010/05/25/fix-php-4-client-does-not-support-authentication-protocol/#comments</comments>
		<pubDate>Tue, 25 May 2010 20:25:44 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1774</guid>
		<description><![CDATA[I&#8217;m working on building an ideal server setup that allows for both PHP 4 and PHP 5 on Apache with suPHP (I&#8217;ll blog about this later). While testing my PHP 4 build, I got the following error: Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in /var/www/test-php.php [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I&#8217;m working on building an ideal server setup that allows for both <a href="http://php.net/">PHP</a> 4 and PHP 5 on <a href="http://www.apache.org/">Apache</a> with <a href="http://www.suphp.org/Home.html">suPHP</a> (I&#8217;ll blog about this later). While testing my PHP 4 build, I got the following error:</p>
<p style="padding-left: 30px;">Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in /var/www/test-php.php  on line 3<br />
Couldn&#8217;t authenticate with MySQL</p>
<p>The code I used to test this is quite simple:</p>
<pre>&lt;?php

if ( false === ( $db = mysql_connect( 'localhost', 'username', 'password' ) ) )
    die( "Couldn't authenticate with MySQL" );

if ( false === mysql_select_db( 'database' ) )
    die( "Couldn't connect to database" );

echo "Yay!";

?&gt;</pre>
<p>After digging around for a bit, I found that mixing PHP 4 with a MySQL version greater than or equal to 4.1 causes this problem. MySQL 4.1 introduced a new password caching scheme that PHP 4 can&#8217;t work with.</p>
<p>The solution is to update the database user&#8217;s password using the OLD_PASSWORD function of MySQL. For example:</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@office</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">mysql -u root -p mysql</span>
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 267
Server version: 5.1.41-3ubuntu12.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">update user set Password=OLD_PASSWORD('<span style="text-decoration: underline;">password</span>') WHERE User='<span style="text-decoration: underline;">username</span>';</span>
Query OK, 0 rows affected (0.02 sec)
Rows matched: 0  Changed: 0  Warnings: 0

<span style="color:#8FED99;">mysql&gt;</span> <span style="color:#FFF;">flush privileges;</span>
Query OK, 0 rows affected (0.00 sec)

<span style="color:#8FED99;">mysql&gt;</span></pre>
<p>Note the underlined areas. That is where you&#8217;ll want to provide your own username and password.</p>
<p>Once you&#8217;ve followed these steps, both PHP 4 and PHP 5 will be able to communite with the database.</p>
<p>Thanks to <a href="http://www.digitalpeer.com/id/mysql">digitalpeer</a> for providing the answer to my issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2010/05/25/fix-php-4-client-does-not-support-authentication-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL ERROR 1018: Unable to Follow Symlink in Ubuntu</title>
		<link>http://chrisjean.com/2010/05/21/mysql-error-1018-unable-to-follow-symlink-in-ubuntu/</link>
		<comments>http://chrisjean.com/2010/05/21/mysql-error-1018-unable-to-follow-symlink-in-ubuntu/#comments</comments>
		<pubDate>Fri, 21 May 2010 17:40:31 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[symlink]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1764</guid>
		<description><![CDATA[I recently had a issue getting MySQL to read a specific database. Each time I tried to manually query a table in the database, I received the following error message: ERROR 1018 (HY000): Can't read dir of './default/' (errno: 13) I&#8217;ve seen this message before as it means that there is a permissions issue. I [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I recently had a issue getting MySQL to read a specific database. Each time I tried to manually query a table in the database, I received the following error message:</p>
<pre>ERROR 1018 (HY000): Can't read dir of './default/' (errno: 13)</pre>
<p>I&#8217;ve seen this message before as it means that there is a permissions issue. I checked the ownerships and permissions, and everything seemed to be in order.</p>
<p>The only thing special about this database is that I have it symlinked to another partition. This has always worked in the past, so I was stumped.</p>
<p>The problem turned out to be that Ubuntu has <a href="http://en.wikipedia.org/wiki/AppArmor">AppArmor</a>. This software sets up rules that prevent software from gaining access to different areas of the file system. In my case, AppArmor was preventing read and write access to the actual location of my database files.</p>
<p>The solution was quite easy: First, I added the path that I wanted MySQL to have access to in the AppArmor configuration file for MySQL. Second, I restarted the apparmor service. Here&#8217;s the technical details:</p>
<ol>
<li>On my system, the configuration file that controls MySQL permissions through AppArmor are located at /etc/apparmor.d/usr.sbin.mysqld. The following shows the contents of the file as it now exists:
<pre># vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include 

/usr/sbin/mysqld {
  #include
  #include
  #include
  #include
  #include 

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /etc/mysql/*.pem r,
  /etc/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/my.cnf r,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,
  /var/lib/mysql/ r,
  /var/lib/mysql/** rwk,
  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
  <strong>/home/sites/default/mysql/ rw,
  /home/sites/default/mysql/* rw,</strong>

  /sys/devices/system/cpu/ r,
}</pre>
<p>The two lines in bold show what I added to the configuation. The first line gives read and write access to the directory itself while the second gives read and write access to the files contained in the directory.</li>
<li>After saving the configuration changes, I simply needed to restart the AppArmor daemon. I did this with the following command:
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo service apparmor restart</span>
 * Reloading AppArmor profiles
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2010/05/21/mysql-error-1018-unable-to-follow-symlink-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Upgrade to Firefox 3.6 on Ubuntu 9.10</title>
		<link>http://chrisjean.com/2010/01/21/upgrade-to-firefox-3-6-on-ubuntu-9-10/</link>
		<comments>http://chrisjean.com/2010/01/21/upgrade-to-firefox-3-6-on-ubuntu-9-10/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:00:11 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1743</guid>
		<description><![CDATA[One of my all-time most popular posts was how to upgrade to Firefox 3.5 in Ubuntu 9.04. Now it&#8217;s Firefox 3.6&#8242;s turn to be installed on my system that is now running Ubuntu 9.10. The team working on Firefox have put a ton of effort into this release and, in order to make our browsing [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>One of my all-time most popular posts was how to <a href="http://chrisjean.com/2009/07/01/upgrade-to-firefox-3-5-on-ubuntu-9-04-jaunty-jackalope/" target="_blank">upgrade to Firefox 3.5</a> in Ubuntu 9.04. Now it&#8217;s Firefox 3.6&#8242;s turn to be installed on my system that is now running Ubuntu 9.10.</p>
<p>The team working on Firefox have put a ton of effort into this release and, in order to make our browsing lives safer and faster, rolled a number of features scheduled for 3.7 into this release. Thanks for all the hard work guys.</p>
<p>Read the <a href="http://hacks.mozilla.org/2010/01/firefox-3-6-is-here/" target="_blank">3.6 release announcement</a> for details about what is new with this release.</p>
<p>So now onto the installation. Here are the commands that I ran in terminal to install 3.6.</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">cd /tmp/</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">wget "http://download.mozilla.org/?product=firefox-3.6&amp;os=linux〈=en-US"</span>
--2010-01-21 11:41:08--  http://download.mozilla.org/?product=firefox-3.6&amp;os=linux〈=en-US
Resolving download.mozilla.org... 63.245.209.58
Connecting to download.mozilla.org|63.245.209.58|:80... connected.
...

100%[=============================&gt;] 10,161,471   924K/s   in 11s     

2010-01-21 11:41:20 (899 KB/s) - `firefox-3.6.tar.bz2' saved [10161471/10161471]

<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">tar xvjf firefox-*.bz2</span>
tar: Record size = 8 blocks
firefox/
firefox/update.locale
firefox/plugins/
firefox/plugins/libnullplugin.so
...
firefox/defaults/autoconfig/platform.js
firefox/defaults/autoconfig/prefcalls.js
firefox/libmozjs.so
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo cp -r firefox /usr/lib/firefox-3.6</span>
[sudo] password for chris:
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo mv /usr/bin/firefox /usr/bin/firefox.old</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo ln -s /usr/lib/firefox-3.6/firefox /usr/bin/firefox-3.6</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo ln -s /usr/bin/firefox-3.6 /usr/bin/firefox</span></pre>
<p>Simply run each command listed in white in your terminal to upgrade your system with the latest release version of Firefox.</p>
<p>After running these commands, close out Firefox, wait a few seconds to let everything shut down properly, and run Firefox again. If all the steps were executed properly and without error, you should be running 3.6. You can click Help &gt; About Mozilla Firefox to confirm.</p>
<p>Happy browsing.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2010/01/21/upgrade-to-firefox-3-6-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Move Gnome Panels to a Different Monitor in Ubuntu</title>
		<link>http://chrisjean.com/2009/11/03/move-gnome-panels-to-a-different-monitor-in-ubuntu/</link>
		<comments>http://chrisjean.com/2009/11/03/move-gnome-panels-to-a-different-monitor-in-ubuntu/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:37:05 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Dual Monitors]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Panels]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1709</guid>
		<description><![CDATA[My dual monitor setup didn&#8217;t work properly in Ubuntu 9.04, Jaunty Jackalope. Fortunately, it does work properly in 9.10, Karmic Kaola. However, this newfound dual monitor setup has given me a new problem: how do I move my panels to the secondary monitor? My office machine is a laptop. When I get in the office, [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>My dual monitor setup didn&#8217;t work properly in Ubuntu 9.04, Jaunty Jackalope. Fortunately, it does work properly in 9.10, Karmic Kaola. However, this newfound dual monitor setup has given me a new problem: how do I move my panels to the secondary monitor?</p>
<p>My office machine is a laptop. When I get in the office, I hook it up to a 24&#8243; LCD. I&#8217;d like to use this external monitor as the primary, which means that I definitely want to have my panels display on it. However, as much as I tried to drag the panels around or play around with settings, there just didn&#8217;t seem to be a way to get them over there. However, I just figured it out.</p>
<p>By default, panels are set to expand. This means that the panels will span the entire width or height of the section of the window they occupy. If the expand option is disabled, they turn into self-sizing bar that can be dragged to different edges or centered.</p>
<p>Having the expand option disabled also allows you to grab and edge of the panel and drag it to another screen. Once on the screen you want it on, simply re-enable the expand option and you now have the panel on another screen.</p>
<p>Here&#8217;s a step-by-step way of moving a panel to another screen:</p>
<ol>
<li>Right-click the panel you wish to move and select &#8220;Properties&#8221;.</li>
<li>Uncheck the &#8220;Expand&#8221; option under the &#8220;General&#8221; tab.</li>
<li>Grab one of the edges of the panel by clicking on the left or right end (top or bottom end for vertical panels).</li>
<li>Drag the bar to the desired screen and position.</li>
<li>Check the &#8220;Expand&#8221; option in the &#8220;Panel Properties&#8221; window and click &#8220;Close&#8221;.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/11/03/move-gnome-panels-to-a-different-monitor-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Use PHP Pear with Ubuntu</title>
		<link>http://chrisjean.com/2009/11/02/use-php-pear-with-ubuntu/</link>
		<comments>http://chrisjean.com/2009/11/02/use-php-pear-with-ubuntu/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 21:16:48 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Karmic Kaola]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1700</guid>
		<description><![CDATA[PEAR is PHP&#8217;s equivalent of Perl&#8217;s CPAN. It offers hundreds of ready-to-use code modules that can make projects go much more quickly than having to hand code everything. However, it never seems like PEAR is easy to get running. Installing the Needed Software In Ubuntu, installing the following packages will quickly get you started with [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p><a href="http://pear.php.net/" target="_blank">PEAR</a> is PHP&#8217;s equivalent of <a href="http://cpan.org/" target="_blank">Perl&#8217;s CPAN</a>. It offers hundreds of ready-to-use code modules that can make projects go much more quickly than having to hand code everything. However, it never seems like PEAR is easy to get running.</p>
<h3>Installing the Needed Software</h3>
<p>In Ubuntu, installing the following packages will quickly get you started with PEAR: php5-cli, php5-dev, and php-pear.</p>
<p>Make sure that you read the next section about problems with using PEAR to install PEAR packages if you are running 9.10, Karmic Kaola.</p>
<p>Here&#8217;s an example of how to quickly install those packages from the terminal.</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo apt-get install php5-cli php5-dev php-pear</span>
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
autoconf autoconf2.13 automake automake1.4 autotools-dev libltdl-dev libssl-dev libtool m4 php5-common shtool zlib1g-dev
Suggested packages:
autobook autoconf-archive gnu-standards autoconf-doc gettext libtool-doc automaken gfortran fortran95-compiler gcj php5-suhosin
The following NEW packages will be installed:
autoconf autoconf2.13 automake automake1.4 autotools-dev libltdl-dev libssl-dev libtool m4 php-pear php5-cli php5-common php5-dev shtool zlib1g-dev
0 upgraded, 15 newly installed, 0 to remove and 5 not upgraded.
Need to get 0B/8,690kB of archives.
After this operation, 27.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package m4.
(Reading database ... 127272 files and directories currently installed.)
Unpacking m4 (from .../archives/m4_1.4.13-2_i386.deb) ...
...</pre>
<p>With these packages, you are ready to roll with PHP and PEAR in Ubuntu.</p>
<h3>Problem with Ubuntu 9.10 Karmic Kaola</h3>
<p>A great thing about PEAR is that you can quickly install packages with a simple command. For example, &#8220;sudo pear install PHP_Parser-0.2.1&#8243; will install the <a href="http://pear.php.net/package/PHP_Parser/" target="_blank">PHP_Parser</a> package. However, this doesn&#8217;t work properly in Ubuntu 9.10, Karmic Kaola.</p>
<p>Output of the standard PEAR install command can be seen below:</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo pear install PHP_Parser-0.2.1</span>
downloading PHP_Parser-0.2.1.tgz ...
Starting to download PHP_Parser-0.2.1.tgz (70,782 bytes)
.................done: 70,782 bytes</pre>
<p>While this doesn&#8217;t look wrong, it has actually failed. Rather than installing the package, it has simply downloaded the archive, encountered an unchecked error, and crashed. A successful installation has a message saying that the installation is successful.</p>
<p>This problem can be easily fixed by giving the install command the &#8220;-Z&#8221; option. For example:</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo pear install -Z PHP_Parser-0.2.1</span>
downloading PHP_Parser-0.2.1.tar ...
Starting to download PHP_Parser-0.2.1.tar (Unknown size)
.............................................................................done: 533,504 bytes
install ok: channel://pear.php.net/PHP_Parser-0.2.1</pre>
<p>Notice the &#8220;install ok: &#8230;&#8221; portion of the message. That&#8217;s what you should see at the end of a successful installation.</p>
<p>For more details on this bug, please check out <a href="https://bugs.launchpad.net/ubuntu/+source/php5/+bug/451314" target="_blank">Bug #451314</a> on the Ubuntu bug tracker.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/11/02/use-php-pear-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix Volume not Working in Ubuntu 9.10 Karmic Kaola</title>
		<link>http://chrisjean.com/2009/11/02/fix-volume-not-working-in-ubuntu-9-10-karmic-kaola/</link>
		<comments>http://chrisjean.com/2009/11/02/fix-volume-not-working-in-ubuntu-9-10-karmic-kaola/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:17:37 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[Karmic Kaola]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1691</guid>
		<description><![CDATA[I just encountered an odd issue with Ubuntu 9.10, Karmic Kaola. I had music playing in the background, I adjusted the volume, and I noticed that there wasn&#8217;t any change in the volume level. Even maxing out the volume and muting it had no effect. After wondering if the problem was that I went insane, [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I just encountered an odd issue with Ubuntu 9.10, Karmic Kaola. I had music playing in the background, I adjusted the volume, and I noticed that there wasn&#8217;t any change in the volume level. Even maxing out the volume and muting it had no effect.</p>
<p>After wondering if the problem was that I went insane, I looked in Sound Preferences (right-click the volume icon and select Sound Preferences) and found that &#8220;RV635 Audio device [Radeon HD 3600 Series] Digital Stereo (HDMI)&#8221;  was selected under the device output. This means that Ubuntu was trying to send audio over my HDMI connection rather than through my headphone jacks.</p>
<p>This wasn&#8217;t a problem last night, so it might be due to the fact that my external monitor at the office runs over the HDMI connection, so it automatically switched to the HDMI audio output. In one way, this is nice, in another way, it will frustrate me to no end if it does this every time I&#8217;m at the office. If I&#8217;m right that it automatically switched upon detecting an active HDMI connection, then wouldn&#8217;t it be better to make it easier to provide a notification on where to switch the audio output rather than just switching it and causing confusion?</p>
<p><img class="alignnone size-full wp-image-1693" title="HDMI selected in sound output in Ubuntu Karmic Kaola" src="http://chrisjean.com/wp-content/uploads/2009/11/screenshot_017.png" alt="HDMI selected in sound output in Ubuntu Karmic Kaola" width="544" height="525" /></p>
<p>Switching the option to &#8220;Internal Audio Analog Stereo&#8221; instantly fixed the problem.</p>
<p>Oddly enough, when I manually selected the HDMI output again, it muted the analog output. So, it seems that it may not be a complete switchover or possibly just a bug. I&#8217;ll continue to see how the situation plays out and make a Ubuntu bug report if necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/11/02/fix-volume-not-working-in-ubuntu-9-10-karmic-kaola/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Rough Launch for Ubuntu One on Ubuntu 9.10 &#8211; Karmic Kaola</title>
		<link>http://chrisjean.com/2009/10/31/a-rough-launch-for-ubuntu-one/</link>
		<comments>http://chrisjean.com/2009/10/31/a-rough-launch-for-ubuntu-one/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 15:33:55 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Random Ramblings]]></category>
		<category><![CDATA[Karmic Kaola]]></category>
		<category><![CDATA[Launch]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu One]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1686</guid>
		<description><![CDATA[Ubuntu 9.10, Karmic Kaola, launched earlier this week. One of the key new features in this release is Ubuntu One. Unfortunately, from what I&#8217;ve seen, this new feature/product launch has been anything but smooth. Ubuntu One is one of the new ways that Canonical, the creators of Ubuntu, is trying to generate some revenue based [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Ubuntu 9.10, Karmic Kaola, launched earlier this week. One of the key new features in this  release is <a href="https://one.ubuntu.com/" target="_blank">Ubuntu One</a>. Unfortunately, from what I&#8217;ve seen, this new feature/product launch has been anything but smooth.</p>
<p>Ubuntu One is one of the new ways that <a href="http://www.canonical.com/" target="_blank">Canonical</a>, the creators of Ubuntu, is trying to generate some revenue based on their distro. Ubuntu One is a hosted file storage solution that allows users to keep a folder and all of its content synced between multiple computers. All users get 2GB of storage for free with the option of increasing the store to 50GB for $10/month.</p>
<p>Since this new offering has many Ubuntu users very excited, I thought I&#8217;d give it a try as soon as I installed the new release. However, I was instantly met with a very big message telling me that something was wrong.</p>

<h3>Launch Day: Problem 1</h3>
<p>When I first started Ubuntu One, the following notification appeared:</p>
<blockquote><p><strong>Capabilities Mismatch</strong><br />
There was a capabilities mismatch while attempting to connect to the Ubuntu One server. You may have installed a newer version of the client, for which the server does not yet provide support. A new version of the server should be accessible soon. Please be patient while we update.</p></blockquote>
<p>Ubuntu is supposed to be a Linux distro designed for the average computer user. Since this large message appears for a short period of time and it isn&#8217;t easily understood, I think that this message could very easily give users a very bad first experience. I believe it would be much more simple to simply say the following:</p>
<blockquote><p><strong>Server Connection Failed</strong><br />
Please ensure that you have installed all software updates and try again at a later time.</p></blockquote>
<p>The reason why I believe the software update portion should be included is because the problem wasn&#8217;t the server, it was the client. This morning my system told me some updates were available, and a few of these updates got rid of the &#8220;Capabilities Mismatch&#8221; problem and allowed the software to connect properly.</p>
<p>The packages that fixed this are the following:</p>
<ul>
<li>python-ubuntuone-client</li>
<li>ubuntuone-client</li>
<li>ubuntuone-client-gnome</li>
</ul>
<p>Each of these were updated to version 1.0.2-0ubuntu2. After the update, I closed the Ubuntu One software, restarted it, and the folder sync worked as expected. However, this is when another problem became clear.</p>
<h3>Houston, We Have a Problem&#8230; Again</h3>
<p>There are two parts to the Ubuntu One system. The first is the server/client connection that actively syncs the Ubuntu One folder between the computer and the Ubuntu One server. The second is an online system you can access through the browser. This online system allows you to manage folders and files from inside your browser.</p>
<p>When I first started to play with Ubuntu One, even though the folder sync didn&#8217;t function, the web access system did. Using this method allowed me to get a feel for what Canonical was aiming to offer its users. As soon as the server/client issue was fixed, I decided to play around with syncing files and then looking at them on the online system. This is when I found Ubuntu One&#8217;s second problem.</p>
<p>Disappointingly, as soon as Ubuntu One&#8217;s client started to work properly, their online system failed. So, is this out of the kettle and into the fire?</p>
<p>Again, this failed in a manner that is difficult to understand. You set up a Ubuntu One account by using a <a href="https://launchpad.net/" target="_blank">Launchpad</a> account. I went to <a href="http://one.ubuntu.com/" target="_blank">one.ubuntu.com</a>, the Ubuntu One  site, clicked &#8220;Sign In&#8221;, input my login details, and was redirected to the home page again with no feedback message. So, I clicked &#8220;Sign In&#8221; again, and I was once again redirected back to the homepage. Seems like some authentication issues were going on between the Ubuntu One and Launchpad systems.</p>
<p>As with the previous issue, my problem isn&#8217;t how the system failed &#8212; I&#8217;m a programmer, I know how things can go wrong &#8212; it&#8217;s with the fact that no feedback was given to the user. It simply didn&#8217;t work.</p>
<h3>Conclusion</h3>
<p>As I finish up this post, I see that Ubuntu One&#8217;s online system is functional again. However, as I&#8217;ve tested this throughout the day, it seems like it was down for at least a few hours. Overall, this is not a bad downtime, but it does tarnish the launch.</p>
<p>To be frank, I feel a bit bad being so harsh to software and services that I am getting access to for free; however, as per <a href="http://www.ubuntu.com/news/ubuntu-910" target="_blank">Canonical&#8217;s own press release</a>, they are extremely-focused on the user experience. As a user, I have to say that my experience with the new Ubuntu One service was less than good.</p>
<p>I know that <a href="http://en.wikipedia.org/wiki/Mark_Shuttleworth" target="_blank">Mark Shuttleworth</a>, founder of Canonical, believes that Ubuntu can take on <a href="http://www.microsoft.com/windows/" target="_blank">Microsoft&#8217;s Windows</a> head on. I also believe that Ubuntu has this potential; however, launch experiences like this aren&#8217;t going to win any new fans. One of the biggest disappointments that many people have with Microsoft is that many of their products, Windows included, feel like they were rushed out of development just to get a release.</p>
<p>Considering that Ubuntu One and Ubuntu are both Canonical creations, it looks really bad when Canonical can&#8217;t even get their own products to work together properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/10/31/a-rough-launch-for-ubuntu-one/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>man Pages for C Development in Ubuntu</title>
		<link>http://chrisjean.com/2009/09/26/man-pages-for-c-development-in-ubuntu/</link>
		<comments>http://chrisjean.com/2009/09/26/man-pages-for-c-development-in-ubuntu/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 05:00:23 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Mastering The Command Line]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1493</guid>
		<description><![CDATA[I recently tutored a friend in C coding. Since I hadn&#8217;t worked with C in at least 8 years, I really needed to have some references to rely on for syntax and other specifics. Fortunately, there are some easy man pages that can be installed in Ubuntu that offer helpful information that I was able [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I recently tutored a friend in C coding. Since I hadn&#8217;t worked with C in at least 8 years, I really needed to have some references to rely on for syntax and other specifics. Fortunately, there are some easy man pages that can be installed in Ubuntu that offer helpful information that I was able to use to help refresh my memory.</p>
<p>These man pages are easily installed by installing the <code>manpages-dev</code> package. You can install this package via Synaptic or directly on the command line. I like the command line method personally, so I ran <code>sudo apt-get install manpages-dev</code> from the command line to quickly install the package.</p>
<p>After installing the package, I&#8217;m able to access man pages for functions such as <code>printf</code>, <code>opendir</code>, and <code>putc</code>. For each function, it shows the valid syntax as well as what library is required to make use of the function.</p>
<p>The information isn&#8217;t limited to functions as you can also access information on the libraries, such as <code>stdio</code> or <code>string</code>.</p>
<p>To access any of this information, simply run <code>man [function or library name]</code> such as <code>man stdio</code>.</p>
<p>This package isn&#8217;t limited to C functions/libraries. It is a general use Linux development suite of man pages. For a full list of what is installed, check out the <a href="http://packages.ubuntu.com/hardy/all/manpages-dev/filelist" target="_blank">file list</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/09/26/man-pages-for-c-development-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively Updating Git Submodules</title>
		<link>http://chrisjean.com/2009/09/16/recursively-updating-git-submodules/</link>
		<comments>http://chrisjean.com/2009/09/16/recursively-updating-git-submodules/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:30:20 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[submodules]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1528</guid>
		<description><![CDATA[I had fun writing about how I work with Git yesterday. I thought I&#8217;d continue on that thread. I have a solid set of code libraries that I&#8217;ve written that latch into the WordPress themes we produce at iThemes. Each time code is duplicated across different repositories, I break that code out and make it [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I had fun writing about how I work with Git yesterday. I thought I&#8217;d continue on that thread.</p>
<p>I have a solid set of code libraries that I&#8217;ve written that latch into the WordPress themes we produce at <a href="http://ithemes.com/" target="_blank">iThemes</a>. Each time code is duplicated across different repositories, I break that code out and make it into a separate repository. I then link it back into the project as a submodule. This makes it extremely-easy to keep duplicated code across numerous repositories updated with little or no fuss.</p>
<p>After cloning a repository, simply run <code>git submodule init</code> followed by <code>git submodule update</code> in order to initialize all the submodules and update their container folder with the content of the submodule&#8217;s repository. For a long time, this is exactly what I did when I would clone a theme repository to start working on it. However, this quickly wasn&#8217;t enough.</p>
<p>The problem happened as soon as I added a submodule to a repository that was also a submodule of other repositories. Doing the submodule init and update process wouldn&#8217;t do everything I needed in this case as there would be submodules in some subfolder that haven&#8217;t been set up.</p>
<p>I didn&#8217;t want to get into a habit of always switching to other directories and doing the submodule processes there as well since I 1) knew that I would forget all-too-often, thus wasting my time, and 2) knew that this would not be the last time that a submodule had submodules. Heck, there is even the possibility that I&#8217;ll have a submodule that has a submodule that has a submodule. It was immediately clear that I needed a script to do all this dirty work for me. The rest of this post will be about the script I created.</p>

<h3>The Script</h3>
<p>First, I&#8217;ll share the script itself. If you are interested in how it works, continue reading.</p>
<p><a href="http://chrisjean.com/git-submodule-recursive-update" target="_blank">git-submodule-recursive-update</a> (right-click &gt; &#8220;Save Link As&#8230;&#8221; to download)</p>
<p>The script is written in Perl and should work on most systems. I&#8217;ve only tested it on Linux and OS X, so please let me know your results if you try out on Windows.</p>
<pre class="code" style="padding:20px 0 20px;">#!/usr/bin/perl

use strict;
use Cwd;

init_and_update();

exit;

sub init_and_update
{
    my $start_path = cwd();

    my %paths;
    my $updated;

    do
    {
        my $data = `find . -name '.gitmodules'`;
        chomp($data);

        $data =~ s/\/\.gitmodules//g;

        foreach my $path (split(/\n/, $data))
        {
            $paths{$path} = '' if($paths{$path} eq '');
        }

        $updated = 0;

        foreach my $path (sort keys %paths)
        {
            if($paths{$path} eq '')
            {
                chdir($path);
                `git submodule init 2&gt;&amp;1`;
                `git submodule update 2&gt;&amp;1`;
                chdir($start_path);

                if($ARGV[0] eq '--remove-gitmodules')
                {
                    unlink("$path/.gitmodules");
                }

                $paths{$path} = 1;

                $updated++;
            }
        }
    } while($updated);
}</pre>
<h3>The Description</h3>
<p>The functionality should look very straight-forward to anyone that knows Perl.</p>
<ol>
<li>I store the current directory in the <code>$start_path</code> variable in order to always know where home is.</li>
<li>I start a wrapper loop that keeps running until all the possible submodules are initialized and updated.</li>
<li>Using the find command, I look for all the instances of <code>.gitmodules</code> and store the results in <code>$data</code>. The <code>.gitmodules</code> file exists if a repo has submodules.</li>
<li>I remove all the <code>.gitmodules</code> file references from the <code>$data</code> to leave just the paths.</li>
<li>I split the paths into an array and initialize the <code>%paths</code> hash to have a blank value for new paths (stored in the key). Setting this value to blank will flag the following loop that the submodules in that path have not been set up yet.</li>
<li>I create a tracker variable, <code>$updated</code>, to check if anything happened in the loop.</li>
<li>I then loop through the <code>%paths</code> hash to work on each path. If the path&#8217;s hash value is blank, I process that path.</li>
<li>I <code>cd</code> into the repo path, init and update the submodules, and switch back to the starting folder.</li>
<li>If the script is called with the optional <code>--remove-gitmodules</code> argument, I remove the <code>.gitmodules</code> folder while I&#8217;m focused on that folder. I use this for other automation scripts, so it may or may not be of value to you.</li>
<li>I then set the path&#8217;s hash value to <code>1</code> to flag it as done.</li>
<li>Closing out the loop, I update the <code>$updated</code> variable to show that something was updated in this pass.</li>
<li>Finishing up the <code>do</code> loop towards the top, I have <code>while($updated)</code>. Basically, as long as something was updated in the core update loop, I&#8217;ll run everything again. This means that the loop will keep running until it didn&#8217;t find anything else that needed to be updated. When that point is reached, the main loop ends, and the script is finished.</li>
</ol>
<p>I know that there are a number of things I could have done to make for a much more brief, compact script, but I was going to quick production with solid functionality, not brevity. In addition, there are unnecessary elements such as incrementing the <code>$updated</code> variable rather than just setting it to some value. I thought might want to know how many things were updated at some point, so I left it as a counter.</p>
<p>If you found this script helpful, please leave a comment. The more interest these Git-related posts receive, the more motivated I&#8217;ll be to share other processes, developments I&#8217;ve made to make working Git easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/09/16/recursively-updating-git-submodules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
