<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Web Design Philippines | MikeWagan.net</title>
	
	<link>http://www.mikewagan.net</link>
	<description>Web Design, Life, and Everything in Between</description>
	<lastBuildDate>Sat, 10 Jul 2010 06:15:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MikeWaganDotNet" /><feedburner:info uri="mikewagandotnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>MikeWaganDotNet</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Drupal – How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/o9UFVnCVHoM/</link>
		<comments>http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 05:53:28 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[white screen of death]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=351</guid>
		<description><![CDATA[While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded. There was just a blank white page &#8211; more appropriately called the Drupal White Screen of Death or WSOD. First step I did was to enable error reporting because there might also be problems with [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/' rel='bookmark' title='Permanent Link: 9 Tips for Improving Drupal Performance'>9 Tips for Improving Drupal Performance</a> <small>I&#8217;ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also...</small></li><li><a href='http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/' rel='bookmark' title='Permanent Link: Create multiple-step forms using CCK Fieldgroups in Drupal'>Create multiple-step forms using CCK Fieldgroups in Drupal</a> <small>Lately I&#8217;ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the...</small></li><li><a href='http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/' rel='bookmark' title='Permanent Link: How to Upgrade PHP to 5.2 in CentOS'>How to Upgrade PHP to 5.2 in CentOS</a> <small>Developing a Drupal community site has been really good for a while until I needed to search a module to...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded. There was just a blank white page &#8211; more appropriately called the Drupal White Screen of Death or WSOD. First step I did was to enable error reporting because there might also be problems with the template I was customizing: <span id="more-351"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<p>Temporarily edit your index.php file and add these lines at the top (after the first opening tag):<br />
<code><br />
error_reporting(E_ALL);<br />
ini_set('display_errors', TRUE);<br />
ini_set('display_startup_errors', TRUE);</code></p>
<p>// $Id: index.php,v 1.94 2007/12/26&#8230;</p>
<p>Then I went back again to the blank white page and I saw that there were some syntax errors in my template. After fixing those errors in my template I deleted again that chunk of code to avoid others seeing diagnostic errors in the site.</p>
<p>It was a quick solution, but if that did not solve your problems, try checking out these links:</p>
<ul>
<li> <a href="http://drupal.org/node/158043" target="_blank">http://drupal.org/node/158043</a></li>
<li><a href="http://www.chromaticsites.com/blog/15-common-drupal-problems-that-make-you-scream-solutions-included/" target="_blank">http://www.chromaticsites.com/blog/15-common-drupal-problems-that-make-you-scream-solutions-included/</a></li>
</ul>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/' rel='bookmark' title='Permanent Link: 9 Tips for Improving Drupal Performance'>9 Tips for Improving Drupal Performance</a> <small>I&#8217;ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also...</small></li><li><a href='http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/' rel='bookmark' title='Permanent Link: Create multiple-step forms using CCK Fieldgroups in Drupal'>Create multiple-step forms using CCK Fieldgroups in Drupal</a> <small>Lately I&#8217;ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the...</small></li><li><a href='http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/' rel='bookmark' title='Permanent Link: How to Upgrade PHP to 5.2 in CentOS'>How to Upgrade PHP to 5.2 in CentOS</a> <small>Developing a Drupal community site has been really good for a while until I needed to search a module to...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/</feedburner:origLink></item>
		<item>
		<title>20+ WordPress Codes You Might Need On Your Next Project</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/JVMv3wCcorY/</link>
		<comments>http://www.mikewagan.net/2010/04/20-wordpress-codes-you-might-need-on-your-next-project/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 08:13:13 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Design Resources]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress codes]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=348</guid>
		<description><![CDATA[Undeniably, WordPress has been a premiere choice by web designers and internet publishers as their main blogging platform. One of the considerations of their choice is the flexibility of WordPress and easy customization of templates. Also, a lot of resources are available online on how to make the popular platform even more. Here are 20+ [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2009/09/10-plugins-to-make-wordpress-a-great-cm/' rel='bookmark' title='Permanent Link: 10 Plugins to Make WordPress a Great CMS'>10 Plugins to Make WordPress a Great CMS</a> <small>I&#8217;ve been using the blogging platform, WordPress, as a CMS for the company I&#8217;m working with right now because I...</small></li><li><a href='http://www.mikewagan.net/2009/11/search-and-replace-in-mysql/' rel='bookmark' title='Permanent Link: Search and Replace in MySQL'>Search and Replace in MySQL</a> <small>I just went through a domain transfer for one of our websites, and the links in the posts are all...</small></li><li><a href='http://www.mikewagan.net/2009/12/100-new-free-but-premium-like-wordpress-themes/' rel='bookmark' title='Permanent Link: 100 New Free but Premium-like WordPress Themes'>100 New Free but Premium-like WordPress Themes</a> <small>If you&#8217;re a Worpress Theme addict and you&#8217;ve not yet visited this post, I suggest you do because these are...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Undeniably, WordPress has been a premiere choice by web designers and internet publishers as their main blogging platform. One of the considerations of their choice is the flexibility of WordPress and easy customization of templates. Also, a lot of resources are available online on how to make the popular platform even more. Here are 20+ WordPress Codes that you can use on your next WordPress project. <span id="more-348"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<h3>Display Tags In A Dropdown Menu</h3>
<p>In your theme folder, paste the following code to the functions.php  file. If you don’t have a functions.php file, create one.</p>
<pre><code>&lt;?php
function dropdown_tag_cloud( $args = '' ) {
	$defaults = array(
		'smallest' =&gt; 8, 'largest' =&gt; 22, 'unit' =&gt; 'pt', 'number' =&gt; 45,
		'format' =&gt; 'flat', 'orderby' =&gt; 'name', 'order' =&gt; 'ASC',
		'exclude' =&gt; '', 'include' =&gt; ''
	);
	$args = wp_parse_args( $args, $defaults );

	$tags = get_tags( array_merge($args, array('orderby' =&gt; 'count', 'order' =&gt; 'DESC')) ); // Always query top tags

	if ( empty($tags) )
		return;

	$return = dropdown_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
	if ( is_wp_error( $return ) )
		return false;
	else
		echo apply_filters( 'dropdown_tag_cloud', $return, $args );
}

function dropdown_generate_tag_cloud( $tags, $args = '' ) {
	global $wp_rewrite;
	$defaults = array(
		'smallest' =&gt; 8, 'largest' =&gt; 22, 'unit' =&gt; 'pt', 'number' =&gt; 45,
		'format' =&gt; 'flat', 'orderby' =&gt; 'name', 'order' =&gt; 'ASC'
	);
	$args = wp_parse_args( $args, $defaults );
	extract($args);

	if ( !$tags )
		return;
	$counts = $tag_links = array();
	foreach ( (array) $tags as $tag ) {
		$counts[$tag-&gt;name] = $tag-&gt;count;
		$tag_links[$tag-&gt;name] = get_tag_link( $tag-&gt;term_id );
		if ( is_wp_error( $tag_links[$tag-&gt;name] ) )
			return $tag_links[$tag-&gt;name];
		$tag_ids[$tag-&gt;name] = $tag-&gt;term_id;
	}

	$min_count = min($counts);
	$spread = max($counts) - $min_count;
	if ( $spread &lt;= 0 )
		$spread = 1;
	$font_spread = $largest - $smallest;
	if ( $font_spread &lt;= 0 )
		$font_spread = 1;
	$font_step = $font_spread / $spread;

	// SQL cannot save you; this is a second (potentially different) sort on a subset of data.
	if ( 'name' == $orderby )
		uksort($counts, 'strnatcasecmp');
	else
		asort($counts);

	if ( 'DESC' == $order )
		$counts = array_reverse( $counts, true );

	$a = array();

	$rel = ( is_object($wp_rewrite) &amp;&amp; $wp_rewrite-&gt;using_permalinks() ) ? ' rel="tag"' : '';

	foreach ( $counts as $tag =&gt; $count ) {
		$tag_id = $tag_ids[$tag];
		$tag_link = clean_url($tag_links[$tag]);
		$tag = str_replace(' ', '&amp;nbsp;', wp_specialchars( $tag ));
		$a[] = "\t<span>&lt;<span>option</span><span> value=</span>'$tag_link'&gt;</span>$tag ($count)<span>&lt;/<span>option</span>&gt;</span>";
	}

	switch ( $format ) :
	case 'array' :
		$return =&amp; $a;
		break;
	case 'list' :
		$return = "<span>&lt;<span>ul</span><span> class=</span>'wp-tag-cloud'&gt;</span>\n\t<span>&lt;<span>li</span>&gt;</span>";
		$return .= join("<span>&lt;/<span>li</span>&gt;</span>\n\t<span>&lt;<span>li</span>&gt;</span>", $a);
		$return .= "<span>&lt;/<span>li</span>&gt;</span>\n<span>&lt;/<span>ul</span>&gt;</span>\n";
		break;
	default :
		$return = join("\n", $a);
		break;
	endswitch;

	return apply_filters( 'dropdown_generate_tag_cloud', $return, $tags, $args );
}
?&gt;</code></pre>
<p>Now open the file where you want the list to be displayed and paste  the following code:</p>
<pre><code><span>&lt;<span>select</span><span> name=<span>"tag-dropdown"</span></span><span> onchange=<span>"document.location.href=this.options[this.selectedIndex].value;"</span></span>&gt;</span>
	<span>&lt;<span>option</span><span> value=<span>"#"</span></span>&gt;</span>Tags<span>&lt;/<span>option</span>&gt;</span>
	&lt;?php dropdown_tag_cloud('number=0&amp;order=asc'); ?&gt;
<span>&lt;/<span>select</span>&gt;</span></code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/wordpress-hack-display-your-tags-in-a-dropdown-menu">WpRecipes</a> <strong>Credits:</strong> <a href="http://wphacks.com/how-to-display-wordpress-tags-dropdown-menu/">WpHacks</a></p>
<h3>Get Posts Published Between Two Particular Dates</h3>
<p>Just before the loop starts, paste the following code. Change the  dates on line 3 according to your needs.</p>
<pre><code>&lt;?php
  <span><span>function</span> <span>filter_where</span><span>($where = <span>''</span>)</span> {</span>
        $where .= <span>" AND post_date &gt;= '2009-05-01' AND post_date &lt;= '2009-05-15'"</span>;
    <span>return</span> $where;
  }
add_filter(<span>'posts_where'</span>, <span>'filter_where'</span>);
query_posts($query_string);
?&gt;</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/wordpress-loop-get-posts-published-between-two-particular-dates">WpRecipes</a> <strong>Credits:</strong> <a href="http://codex.wordpress.org/Template_Tags/query_posts#Time_Parameters">Codex</a></p>
<h3>Get Posts With A Specific Custom Field &amp; Value</h3>
<p>Add the query_posts() function just before the Loop. Change the <code>meta_key</code> and <code>meta_value</code> accordingly. The example shown below will  get posts with custom field &#8220;review_type&#8221; with value &#8220;movie&#8221;.</p>
<pre><code>&lt;?php query_posts('meta_key=review_type&amp;meta_value=movie');  ?&gt;
&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
...
...</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/easily-get-posts-with-a-specific-custom-fieldvalue-on-your-wordpress-blog">WpRecipes</a> <strong>Credits:</strong> <a href="http://www.johnkolbert.com/">John  Kolbert</a></p>
<h3>Get Latest Sticky Posts</h3>
<p>Paste the following code before the loop. This code will retrieve the  5 most recent sticky posts. To change the number of retrieved posts,  just change the 5 by the desired value on line  4.</p>
<pre><code>&lt;?php
	$sticky = get_option('sticky_posts');
	rsort( $sticky );
	$sticky = array_slice( $sticky, 0, 5);
        query_posts( array( 'post__in' =&gt; $sticky, 'caller_get_posts' =&gt; 1 ) );
?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-get-latest-sticky-posts">WpRecipes</a> <strong>Credits:</strong> <a href="http://justintadlock.com/archives/2009/03/28/get-the-latest-sticky-posts-in-wordpress">Justin  Tadlock</a></p>
<h3>Automatically Insert Content In Your Feeds</h3>
<p>In your theme folder, functions.php file, paste the following code.  This code will automatically insert the content after each post in your  RSS feeds. Hence you can use this code to insert ads or promotional  text.</p>
<pre><code>function insertFootNote($content) {
        if(!is_feed() &amp;&amp; !is_home()) {
                $content.= "<span>&lt;<span>h4</span>&gt;</span>Enjoyed this article?<span>&lt;/<span>h4</span>&gt;</span>";
                $content.= "<span>&lt;<span>p</span>&gt;</span>Subscribe to our <span>&lt;<span>a</span><span> href=</span>'#'&gt;</span>RSS feed<span>&lt;/<span>a</span>&gt;</span><span>&lt;/<span>p</span>&gt;</span>";
        }
        return $content;
}
add_filter ('the_content', 'insertFootNote');

</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-automatically-insert-content-after-each-post">WpRecipes</a> <strong>Credits:</strong> <a href="http://www.wordpress-tutoriel.com/tutoriel/comment-inserer-du-texte-automatiquement-apres-chaque-article/">Cédric  Bousmane</a></p>
<h3>Display The Most Commented Posts</h3>
<p>Just paste the following code in your template file where you want to  display the most commented posts (eg. sidebar.php). To change the  number of displayed posts, simply change the 5 on line 3.</p>
<pre><code><span>&lt;<span>h2</span>&gt;</span>Popular Posts<span>&lt;/<span>h2</span>&gt;</span>
<span>&lt;<span>ul</span>&gt;</span>
&lt;?php $result = $wpdb-&gt;get_results("SELECT comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count DESC LIMIT 0 , 5");
foreach ($result as $post) {
setup_postdata($post);
$postid = $post-&gt;ID;
$title = $post-&gt;post_title;
$commentcount = $post-&gt;comment_count;
if ($commentcount != 0) { ?&gt;

<span>&lt;<span>li</span>&gt;</span><span>&lt;<span>a</span><span> href=<span>"&lt;?php echo get_permalink($postid); ?&gt;"</span></span><span> title=<span>"&lt;?php echo $title ?&gt;"</span></span>&gt;</span>
&lt;?php echo $title ?&gt;<span>&lt;/<span>a</span>&gt;</span> {&lt;?php echo $commentcount ?&gt;}<span>&lt;/<span>li</span>&gt;</span>
&lt;?php } } ?&gt;

<span>&lt;/<span>ul</span>&gt;</span>
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-display-your-most-popular-content-in-your-blog-sidebar">WpRecipes</a> <strong>Credits:</strong> <a href="http://www.problogdesign.com/wordpress/create-your-own-popular-posts-page/">ProBlogDesign</a></p>
<h3>Display Most Commented Posts In 2008</h3>
<pre><code><span>&lt;<span>h2</span>&gt;</span>Most commented posts from 2008<span>&lt;/<span>h2</span>&gt;</span>
<span>&lt;<span>ul</span>&gt;</span>
&lt;?php
$result = $wpdb-&gt;get_results("SELECT comment_count,ID,post_title, post_date FROM $wpdb-&gt;posts WHERE post_date BETWEEN '2008-01-01' AND '2008-12-31' ORDER BY comment_count DESC LIMIT 0 , 10");

foreach ($result as $topten) {
    $postid = $topten-&gt;ID;
    $title = $topten-&gt;post_title;
    $commentcount = $topten-&gt;comment_count;
    if ($commentcount != 0) {
    ?&gt;
         <span>&lt;<span>li</span>&gt;</span><span>&lt;<span>a</span><span> href=<span>"&lt;?php echo get_permalink($postid); ?&gt;"</span></span>&gt;</span>&lt;?php echo $title ?&gt;<span>&lt;/<span>a</span>&gt;</span><span>&lt;/<span>li</span>&gt;</span>

    &lt;?php }
}
?&gt;
<span>&lt;/<span>ul</span>&gt;</span>
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-display-the-most-commented-posts-of-2008">WpRecipes</a></p>
<h3>Display Related Posts Based On Post Tags</h3>
<p>This code will display related posts based on the current post  tag(s). It must be pasted within the loop.</p>
<pre><code>&lt;?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post-&gt;ID);
if ($tags) {
  echo 'Related Posts';
  $first_tag = $tags[0]-&gt;term_id;
  $args=array(
    'tag__in' =&gt; array($first_tag),
    'post__not_in' =&gt; array($post-&gt;ID),
    'showposts'=&gt;5,
    'caller_get_posts'=&gt;1
   );
  $my_query = new WP_Query($args);
  if( $my_query-&gt;have_posts() ) {
    while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt;

      <span>&lt;<span>p</span>&gt;</span><span>&lt;<span>a</span><span> href=<span>"&lt;?php the_permalink() ?&gt;"</span></span><span> rel=<span>"bookmark"</span></span><span> title=<span>"Permanent Link to &lt;?php the_title_attribute(); ?&gt;"</span></span>&gt;</span>&lt;?php the_title(); ?&gt;<span>&lt;/<span>a</span>&gt;</span><span>&lt;/<span>p</span>&gt;</span>
      &lt;?php
    endwhile;
  }
}
?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-show-related-posts-without-a-plugin">WpRecipes</a> <strong>Credits:</strong> <a href="http://wordpress.org/support/topic/247918">MichaelH</a></p>
<h3>Display The Number Of Search Results</h3>
<p>Open search.php, copy and paste the following code.</p>
<pre><code><span>&lt;<span>h2</span><span> class=<span>"pagetitle"</span></span>&gt;</span>Search Results for &lt;?php /* Search Count */ $allsearch = &amp;new WP_Query("s=$s&amp;showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch-&gt;post_count; _e(''); _e('<span>&lt;<span>span</span><span> class=<span>"search-terms"</span></span>&gt;</span>'); echo $key; _e('<span>&lt;/<span>span</span>&gt;</span>'); _e(' — '); echo $count . ' '; _e('articles'); wp_reset_query(); ?&gt;<span>&lt;/<span>h2</span>&gt;</span>
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-display-the-number-of-results-in-wordpress-search">WpRecipes</a> <strong>Credits:</strong> <a href="http://www.problogdesign.com/wordpress/3-codes-for-a-far-better-wordpress-search-page/">ProBlogDesign</a></p>
<h3>Display The Comment Page Number In The &lt;Title&gt; Tag</h3>
<p>Open the header.php file. Paste the following code in between the <code>&lt;title&gt;</code> tag.</p>
<pre><code>&lt;?php if ( $cpage &lt; 2 ) {}
else { echo (' - comment page '); echo ($cpage);}
?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-avoid-duplicate-content-in-paged-comments">WpRecipes</a> <strong>Credits:</strong> <a href="http://www.malcolmcoles.co.uk/blog/avoid-duplicate-content-paged-comments-wordpress-27/">Malcolm  Coles</a></p>
<h3>Display The Future Posts</h3>
<p>The following code will display 10 future posts.</p>
<pre><code>
	<span>&lt;<span>p</span>&gt;</span>Future events<span>&lt;/<span>p</span>&gt;</span>
	&lt;?php query_posts('showposts=10&amp;post_status=future'); ?&gt;
	&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;

			<span>&lt;<span>p</span>&gt;</span>&lt;?php the_title(); ?&gt; &lt;?php the_time('j. F Y'); ?&gt;<span>&lt;/<span>p</span>&gt;</span>

	&lt;?php endwhile; else: ?&gt;<span>&lt;<span>p</span>&gt;</span>No future posts.<span>&lt;/<span>p</span>&gt;</span>&lt;?php endif; ?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-list-future-posts">WpRecipes</a></p>
<h3>Randomize Posts Order</h3>
<p>To randomize posts order, just add the following code before the  Loop.</p>
<pre><code>query_posts('orderby=rand');
//the Loop here...
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-randomize-posts-order">WpRecipes</a></p>
<h3>Display Word Count Of The Post</h3>
<p>Open single.php and paste the following code where you want to  display the word count.</p>
<pre><code>&lt;?php <span><span>function</span> <span>count_words</span><span>($str)</span>{</span>
     $words = <span>0</span>;
     $str = eregi_replace(<span>" +"</span>, <span>" "</span>, $str);
     $array = explode(<span>" "</span>, $str);
     <span>for</span>($i=<span>0</span>;$i &lt; count($array);$i++)
 	 {
         <span>if</span> (eregi(<span>"[0-9A-Za-zÀ-ÖØ-öø-ÿ]"</span>, $array[$i]))
             $words++;
     }
     <span>return</span> $words;
 }?&gt;

 Word count: &lt;?php echo count_words($post-&gt;post_content); ?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/laura-asked-how-to-get-words-count-of-your-post">WpRecipes</a></p>
<h3>Fetch RSS Feeds</h3>
<p>To display RSS feeds, you can use the WordPress built-in RSS parser.  To do so, include the rss.php file, and then use its <code>wp_rss()</code> function.</p>
<pre><code>&lt;?php include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('http://feeds2.feedburner.com/WebDesignerWall', 5); ?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-display-your-latest-delicious-bookmark-on-your-wordpress-blog">WpRecipes</a></p>
<h3>Highlight Searched Text In Search Results</h3>
<p>Open search.php file and find the <code>the_title()</code> function.  Replace it with the following:</p>
<pre><code>echo $title;</code></pre>
<p>Now, just before the modified line, add this code:</p>
<pre><code>&lt;?php
	$title 	= get_the_title();
	$keys= explode(" ",$s);
	$title 	= preg_replace('/('.implode('|', $keys) .')/iu',
		'<span>&lt;<span>strong</span><span> class=<span>"search-excerpt"</span></span>&gt;</span>\0<span>&lt;/<span>strong</span>&gt;</span>',
		$title);
?&gt;</code></pre>
<p>Then open the style.css file. Add the following line to it:</p>
<pre><code><span>strong</span><span>.search-excerpt</span> <span>{ <span>background</span>:<span> yellow</span>; }</span>
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-enlight-searched-text-in-search-results">WpRecipes</a> <strong>Credits:</strong> <a href="http://yoast.com/wordpress-search/">Joost  de Valk</a></p>
<h3>Display A Greeting Message On A Specific Date (PHP)</h3>
<p>The following code will dispaly a greeting message only on Christmas  day.</p>
<pre><code>&lt;?php
if ((date('m') == 12) &amp;&amp; (date('d') == 25)) { ?&gt;
    <span>&lt;<span>h2</span>&gt;</span>Merry Christmas!<span>&lt;/<span>h2</span>&gt;</span>
&lt;?php } ?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-wish-your-reader-a-merry-christmas">WpRecipes</a></p>
<h3>Automatically Create A TinyURL For Each Post</h3>
<p>Open the functions.php file and paste the following code:</p>
<pre><code><span><span>function</span> <span>getTinyUrl</span><span>($url)</span> {</span>
    $tinyurl = file_get_contents(<span>"http://tinyurl.com/api-create.php?url="</span>.$url);
    <span>return</span> $tinyurl;
}
</code></pre>
<p>In the single.php file, paste the following within the loop where you  want to display the TinyURL:</p>
<pre><code>&lt;?php
$turl = getTinyUrl(get_permalink($post-&gt;ID));
echo 'Tiny Url for this post: <span>&lt;<span>a</span><span> href=<span>"'.$turl.'"</span></span>&gt;</span>'.$turl.'<span>&lt;/<span>a</span>&gt;</span>'
?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-automatically-provide-tinyurls-for-your-wordpress-blog-posts">WpRecipes</a></p>
<h3>Exclude Categories From Search</h3>
<p>Open the search.php file in your theme folder, paste the following  code before the Loop. The code will exclude categories with ID 1, 2, 3  in the search results.</p>
<pre><code>&lt;?php if( is_search() )  :
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("s=$s&amp;paged=$paged&amp;cat=-1,-2,-3");
endif; ?&gt;

//the Loop here...
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-limit-search-to-specific-categories">WpRecipes</a></p>
<h3>Exclude Categories From RSS</h3>
<p>Open the functions.php file from your theme. If your theme doesn’t  have a functions.php file, create one. Paste the following code in it:</p>
<pre><code>&lt;?php <span><span>function</span> <span>myFilter</span><span>($query)</span> {</span>
    <span>if</span> ($query-&gt;is_feed) {
        $query-&gt;set(<span>'cat'</span>,<span>'-5'</span>); <span>//Don't forget to change the category ID =^o^=</span>
    }
<span>return</span> $query;
}

add_filter(<span>'pre_get_posts'</span>,<span>'myFilter'</span>);
?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-exclude-categories-from-your-rss-feed">WpRecipes</a> <strong>Credits:</strong> <a href="http://www.jangro.com/a/2008/03/01/excluding-posts-from-your-blog-feed/"> Scott Jangro</a></p>
<h3>Using Shortcodes</h3>
<p>Open the functions.php file, paste the following code.</p>
<pre><code>&lt;?php <span><span>function</span> <span>wprecipes</span><span>()</span> {</span>
    <span>return</span> <span>'Have you checked out WpRecipes today?'</span>;
}

add_shortcode(<span>'wpr'</span>, <span>'wprecipes'</span>);
?&gt;
</code></pre>
<p>You’re now able to use the <em>wpr</em> shortcode. To do so, paste  the following line of code on the editor (in HTML mode) while writing a  post:</p>
<pre><code>[wpr]</code></pre>
<p>This short code will output the “Have you checked out WpRecipes  today?” message.</p>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-save-time-by-using-wordpress-shortcodes">WpRecipes</a> <strong>Source:</strong> <a href="http://codex.wordpress.org/Shortcode_API">Codex</a></p>
<h3>Display The Number Of Your Twitter Followers</h3>
<p>Paste the code anywhere you want to display the Twitter follower  count. Replace &#8220;YourUserID&#8221; with your Twitter account in last line.</p>
<pre><code>&lt;?php <span><span>function</span> <span>string_getInsertedString</span><span>($long_string,$short_string,$is_html=false)</span>{</span>
  <span>if</span>($short_string&gt;=strlen($long_string))<span>return</span> <span>false</span>;
  $insertion_length=strlen($long_string)-strlen($short_string);
  <span>for</span>($i=<span>0</span>;$i&lt;strlen($short_string);++$i){
    <span>if</span>($long_string[$i]!=$short_string[$i])<span>break</span>;
  }
  $inserted_string=substr($long_string,$i,$insertion_length);
  <span>if</span>($is_html &amp;&amp; $inserted_string[$insertion_length-<span>1</span>]==<span>'&lt;'</span>){
    $inserted_string=<span>'&lt;'</span>.substr($inserted_string,<span>0</span>,$insertion_length-<span>1</span>);
  }
  <span>return</span> $inserted_string;
}

<span><span>function</span> <span>DOMElement_getOuterHTML</span><span>($document,$element)</span>{</span>
  $html=$document-&gt;saveHTML();
  $element-&gt;parentNode-&gt;removeChild($element);
  $html2=$document-&gt;saveHTML();
  <span>return</span> string_getInsertedString($html,$html2,<span>true</span>);
}

<span><span>function</span> <span>getFollowers</span><span>($username)</span>{</span>
  $x = file_get_contents(<span>"http://twitter.com/"</span>.$username);
  $doc = <span>new</span> DomDocument;
  @$doc-&gt;loadHTML($x);
  $ele = $doc-&gt;getElementById(<span>'follower_count'</span>);
  $innerHTML=preg_replace(<span>'/^&lt;[^&gt;]*&gt;(.*)&lt;[^&gt;]*&gt;$/'</span>,<span>"<span>\\</span>1"</span>,DOMElement_getOuterHTML($doc,$ele));
  <span>return</span> $innerHTML;
}
?&gt;

&lt;?php echo getFollowers(<span>"YourUserID"</span>).<span>" followers"</span>; ?&gt;
</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/display-the-total-number-of-your-twitter-followers-on-your-wordpress-blog">WpRecipes</a></p>
<h3>Display FeedBurner Subscriber Count In Text</h3>
<pre><code>&lt;?php
	$fburl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=feed-id";
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, $fburl);
	$stored = curl_exec($ch);
	curl_close($ch);
	$grid = new SimpleXMLElement($stored);
	$rsscount = $grid-&gt;feed-&gt;entry['circulation'];
	echo $rsscount;
?&gt;</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-display-your-feedburner-count-in-full-text">WpRecipes</a></p>
<h3>Display The Latest Twitter Entry</h3>
<p>Just paste this code in the template file (eg. sidebar.php) where you  want to display the latest tweet.</p>
<pre><code>&lt;?php

// Your twitter username.
$username = "TwitterUsername";

$prefix = "<span>&lt;<span>h2</span>&gt;</span>My last Tweet<span>&lt;/<span>h2</span>&gt;</span>";

$suffix = "";

$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&amp;rpp=1";

function parse_feed($feed) {
    $stepOne = explode("<span>&lt;content<span> type=</span>\"<span>html</span>\"&gt;</span>", $feed);
    $stepTwo = explode("<span>&lt;/content&gt;</span>", $stepOne[1]);
    $tweet = $stepTwo[0];
    $tweet = str_replace("&amp;lt;", "&lt;", $tweet);
    $tweet = str_replace("&amp;gt;", "&gt;", $tweet);
    return $tweet;
}

$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix);
?&gt;</code></pre>
<p><strong>Via:</strong> <a href="http://www.wprecipes.com/how-to-display-your-latest-twitter-entry-on-your-wp-blog">WpRecipes</a> <strong>Credits:</strong> <a href="http://scriptplayground.com/tutorials/php/Latest-Twitter-Update-With-PHP/"> Ryan Barr</a></p>
<h3>Social Buttons</h3>
<h4>Facebook Share Button</h4>
<pre><code><span>&lt;<span>a</span><span> href=<span>"http://www.facebook.com/sharer.php?u=&lt;?php the_permalink();?&gt;&amp;t=&lt;?php the_title(); ?&gt;"</span></span>&gt;</span>Share on Facebook<span>&lt;/<span>a</span>&gt;</span></code></pre>
<h4>Digg it</h4>
<pre><code><span>&lt;<span>a</span><span> href=<span>"http://www.digg.com/submit?phase=2&amp;url=&lt;?php the_permalink();?&gt;"</span></span>&gt;</span>Digg It<span>&lt;/<span>a</span>&gt;</span></code></pre>
<h4>Stumble upon it</h4>
<pre><code><span>&lt;<span>a</span><span> href=<span>"http://www.stumbleupon.com/submit?url=&lt;?php the_permalink(); ?&gt;&amp;title=&lt;?php the_title(); ?&gt;"</span></span>&gt;</span>Stumble upon it<span>&lt;/<span>a</span>&gt;</span></code></pre>
<h4>Add to delicious</h4>
<pre><code><span>&lt;<span>a</span><span> href=<span>"http://delicious.com/post?url=&lt;?php the_permalink();?&gt;&amp;title=&lt;?php the_title();?&gt;"</span></span>&gt;</span>Add to delicious<span>&lt;/<span>a</span>&gt;</span></code></pre>
<h4>Share on technorati</h4>
<pre><code><span>&lt;<span>a</span><span> href=<span>"http://technorati.com/faves?sub=addfavbtn&amp;add=&lt;?php the_permalink();?&gt;"</span></span>&gt;</span>Share on technorati<span>&lt;/<span>a</span>&gt;</span></code></pre>
<h4>Tweet this</h4>
<pre><code><span>&lt;<span>a</span><span> href=<span>"http://twitter.com/home?status=Currently reading &lt;?php the_permalink(); ?&gt;"</span></span>&gt;</span>Tweet this<span>&lt;/<span>a</span>&gt;</span></code></pre>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2009/09/10-plugins-to-make-wordpress-a-great-cm/' rel='bookmark' title='Permanent Link: 10 Plugins to Make WordPress a Great CMS'>10 Plugins to Make WordPress a Great CMS</a> <small>I&#8217;ve been using the blogging platform, WordPress, as a CMS for the company I&#8217;m working with right now because I...</small></li><li><a href='http://www.mikewagan.net/2009/11/search-and-replace-in-mysql/' rel='bookmark' title='Permanent Link: Search and Replace in MySQL'>Search and Replace in MySQL</a> <small>I just went through a domain transfer for one of our websites, and the links in the posts are all...</small></li><li><a href='http://www.mikewagan.net/2009/12/100-new-free-but-premium-like-wordpress-themes/' rel='bookmark' title='Permanent Link: 100 New Free but Premium-like WordPress Themes'>100 New Free but Premium-like WordPress Themes</a> <small>If you&#8217;re a Worpress Theme addict and you&#8217;ve not yet visited this post, I suggest you do because these are...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/04/20-wordpress-codes-you-might-need-on-your-next-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/04/20-wordpress-codes-you-might-need-on-your-next-project/</feedburner:origLink></item>
		<item>
		<title>How to Control Two Computers with only One Mouse &amp; Keyboard Without Using a KVM</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/kk8OoG24g-E/</link>
		<comments>http://www.mikewagan.net/2010/04/how-to-control-two-computers-with-only-one-mouse-keyboard-without-using-a-kvm/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 09:52:51 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Computer Tips]]></category>
		<category><![CDATA[synergy+]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=344</guid>
		<description><![CDATA[I&#8217;ve been using this technique when I needed to control my computer but at the same time use a laptop on the side for other specific tasks. The software is called Synergy+. Here are some of the key features of this great piece of free program to use only one set of mouse and keyboard [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-345" title="synergy-plus-frontpage" src="http://www.mikewagan.net/wp-content/uploads/2010/04/synergy-plus-frontpage.jpg" alt="synergy-plus-frontpage" width="490" height="227" />I&#8217;ve been using this technique when I needed to control my computer but at the same time use a laptop on the side for other specific tasks. The software is called Synergy+. Here are some of the key features of this great piece of free program to use only one set of mouse and keyboard across multiple computers and even with different OSes (Linux/Mac/Windows):<span id="more-344"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<ul>
<li>Move your mouse easily between  computers </li>
<li>Requires nothing  other than existing ethernet </li>
<li>Copy  and paste between your computers </li>
<li><No need to press any buttons (unlike KVM) </li>
<li>You can still use multiple monitors on the  same computer </li>
<li>Lock the mouse to one screen temporarily (useful for  games)</li>
</ul>
<p>Read more about it at <a href="http://code.google.com/p/synergy-plus/" target="_blank">Google Code</a> or <a href="http://code.google.com/p/synergy-plus/downloads/list">download here</a>.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/04/how-to-control-two-computers-with-only-one-mouse-keyboard-without-using-a-kvm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/04/how-to-control-two-computers-with-only-one-mouse-keyboard-without-using-a-kvm/</feedburner:origLink></item>
		<item>
		<title>How to Upgrade PHP to 5.2 in CentOS</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/q36wiNCr_7o/</link>
		<comments>http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 11:51:02 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Godaddy VPS]]></category>
		<category><![CDATA[MCRYPT]]></category>
		<category><![CDATA[MHASH]]></category>
		<category><![CDATA[upgrade php]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=336</guid>
		<description><![CDATA[Developing a Drupal community site has been really good for a while until I needed to search a module to integrate Facebook Connect with it. I found this module specifically for that. Unfortunately, it requires PHP version 5.2, but the one on the Godaddy VPS (which is by default a CentOS flavor) is 5.1 I [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/' rel='bookmark' title='Permanent Link: How to Install/Recompile MCRYPT in PHP (CentOS VPS)'>How to Install/Recompile MCRYPT in PHP (CentOS VPS)</a> <small>I&#8217;m starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop....</small></li><li><a href='http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/' rel='bookmark' title='Permanent Link: Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)'>Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</a> <small>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded....</small></li><li><a href='http://www.mikewagan.net/2009/08/wordpress-upgrade-2-8-3/' rel='bookmark' title='Permanent Link: WordPress Upgrade 2.8.3'>WordPress Upgrade 2.8.3</a> <small>Just a self note &#8211; I&#8217;ve upgraded my blog to the latest version of the best blogging platform in the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Developing a Drupal community site has been really good for a while until I needed to search a module to integrate Facebook Connect with it. I found this <a href="http://drupal.org/project/fbconnect">module</a> specifically for that. Unfortunately, it requires PHP version 5.2, but the one on the Godaddy VPS (which is by default a <strong>CentOS</strong> flavor) is 5.1 I think. I needed to <strong>upgrade the PHP version to 5.2</strong>, and the best possible way is to install the latest rpm for CentOS and do a yum update. Here were the steps I did:</p>
<p><span id="more-336"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<p><strong>1. Login to your server using SSH then create an updated .repo file (you need to be root user to do this)</strong></p>
<p><code>vi /etc/yum.repos.d/centos-test.repo</code></p>
<p><strong>2. Paste the following lines in it:</strong><br />
<code><br />
[c5-testing]<br />
name=CentOS-5 Testing<br />
baseurl=http://dev.centos.org/centos/5/testing/$basearch/<br />
enabled=1<br />
gpgcheck=1<br />
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing</code></p>
<p><strong>3. Run a yum update:</strong></p>
<p><code>yum update php</code></p>
<p>That&#8217;s it! Your PHP installation should be updated in about 5 seconds! :)</p>
<p><strong><em>BUT! There are known issues on this</em></strong>, specifically for Zend Optimizer, mcrypt and mhash PHP modules because they are the for the older version of PHP. I fixed the Zend Optimizer issue by re-installing the package itself by yum:</p>
<p><code>wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh<br />
yum install  php-zend-optimizer</code></p>
<p>For the mcrypt and mhash issues, I just installed updated rpm packaged for these:</p>
<p><code>wget -c ftp://ftp.muug.mb.ca/mirror/centos/5.4/extras/i386/RPMS/php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm<br />
rpm -ivh --nodeps php-mhash-5.2.5-7.i386.rpm<br />
wget -c ftp://ftp.pbone.net/mirror/yum.trixbox.org/centos/5/RPMS/php-mhash-5.2.5-7.i386.rpm<br />
rpm -ivh --nodeps php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm</code></p>
<p>Let me know if this helps or what issues you came across.</p>
<p><em><strong>References: </strong></em></p>
<p><em> </em><a href="http://www.freshblurbs.com/install-php-5-2-centos-5-2-using-yum"><em>http://www.freshblurbs.com/install-php-5-2-centos-5-2-using-yum</em></a></p>
<p><em><a href="http://www.atomicorp.com/wiki/index.php/PHP">http://www.atomicorp.com/wiki/index.php/PHP</a></em></p>
<p><em><br />
</em></p>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/' rel='bookmark' title='Permanent Link: How to Install/Recompile MCRYPT in PHP (CentOS VPS)'>How to Install/Recompile MCRYPT in PHP (CentOS VPS)</a> <small>I&#8217;m starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop....</small></li><li><a href='http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/' rel='bookmark' title='Permanent Link: Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)'>Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</a> <small>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded....</small></li><li><a href='http://www.mikewagan.net/2009/08/wordpress-upgrade-2-8-3/' rel='bookmark' title='Permanent Link: WordPress Upgrade 2.8.3'>WordPress Upgrade 2.8.3</a> <small>Just a self note &#8211; I&#8217;ve upgraded my blog to the latest version of the best blogging platform in the...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/</feedburner:origLink></item>
		<item>
		<title>9 Tips for Improving Drupal Performance</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/5AFQffL8XbQ/</link>
		<comments>http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 07:44:28 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[drupal optimization]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=332</guid>
		<description><![CDATA[I&#8217;ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also a good thing that I chose the Drupal System over others like Joomla and WordPress for building something like an article submission site. Drupal is very advanced &#38; flexible since its got a ton of [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/' rel='bookmark' title='Permanent Link: Create multiple-step forms using CCK Fieldgroups in Drupal'>Create multiple-step forms using CCK Fieldgroups in Drupal</a> <small>Lately I&#8217;ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the...</small></li><li><a href='http://www.mikewagan.net/2009/10/working-paypal-module-for-prestashop/' rel='bookmark' title='Permanent Link: Working Paypal Module for Prestashop'>Working Paypal Module for Prestashop</a> <small>I just finished adding the Paypal payment option for our e-commerce site that uses Prestashop as the shopping cart application....</small></li><li><a href='http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/' rel='bookmark' title='Permanent Link: Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)'>Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</a> <small>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also a good thing that I chose the Drupal System over others like Joomla and WordPress for building something like an article submission site. Drupal is very advanced &amp; flexible since its got a ton of available modules and themes. But it also entails some performance drawbacks if you continue to develop a Drupal website without thinking of performance optimization. And with that, here are <strong>9 tips for improving Drupal performance</strong>: <span id="more-332"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<h2>1 – Disable Re-Building of Theme Registry</h2>
<p>When a Drupal implementation is under development, themers and/or  developers will often enable an option that forces Drupal to rebuild the  theme registry on every page load. This registry tells Drupal what  template files and overrides exist in the theme’s directory. This is a  very costly operation and would cause noticeable slow down on any  production website. It is important to disable this option upon going  live. Under Administer &gt; Appearance choose the Configure option for  your theme and scroll to the bottom of the page. Make sure the option  named “Rebuild theme registry on every page.” is disabled.</p>
<h2>2 – Enable Page and Block Cache</h2>
<p>Another simple option to enable is Drupal’s caching engine  (Administer &gt; Configuration &gt; Performance). When enabled, Drupal  will render the page and associated blocks once, and then save that  result in the database. This can drastically reduce the number of  database calls run on a page since the results are pre-rendered.</p>
<p>A point to consider about caching is that the more interactive the  site is, the less effective the cache may be. Especially if complex  permissions are at play, Drupal won’t be able to effectively cache since  most of the page content may change depending on the permissions of the  currently logged in user.</p>
<p>Drupal’s caching engine is most effective for anonymous visitors – if  your site is mostly “read only” and doesn’t have visitors logging in,  caching can make a dramatic improvement in site load speed.</p>
<h2>3 – Increase Cache Lifetime</h2>
<p>An option for some sites may be to increase the cache lifetime. This  determines how long Drupal will hold onto a cached result before it will  re-generate the page. If you have frequently changing content, you may  want to set the cache lifetime to only 5 minutes, but if your content  doesn’t change often, an acceptable value may be several hours.</p>
<p>On high-traffic sites, the less often Drupal has to re-generate  pages, the better.</p>
<h2>4 – Optimize JavaScript and CSS Files</h2>
<p>Also in the Performance settings is an option to optimize both  JavaScript and CSS files. When enabled, Drupal will consolidate all CSS  and JS files included on each page into a single file, and compress the  code by removing whitespace. This will reduce the overall file size and  improve page load speeds.</p>
<h2>5 – Disable Un-used Modules</h2>
<p>Due to the staggering array of available contrib modules listed on  Drupal.org, it’s common to download and install dozens of modules to  test out and see if they meet your site’s needs. In the process of doing  this, it’s easy to forget to uninstall the modules you don’t end up  using. Additionally, the default install of Drupal comes with a minimum  number of modules pre-enabled. Again, if your site isn’t using it,  there’s no reason to keep it enabled.</p>
<p>Drupal will fire callbacks for all enabled modules which may come  with their own database queries. Be sure to take the time to clean out  your enabled modules list before going live with a site.</p>
<h2>6 – Configure Cron to Run</h2>
<p>One thing that’s easy to overlook is setting up Drupal’s cron tasks  to run. Most web hosts provide a way to configure “scheduled tasks” or  “cron jobs” in the hosting panel. Drupal’s cron.php fires updates for  RSS aggregators, launches the search indexer, and any tasks defined in  installed modules. In addition, it will perform some basic maintenance  tasks like deleting temporary files and clearing logs.</p>
<p>The Drupal installation guide <a onclick="javascript:pageTracker._trackPageview('/outbound/article/drupal.org');" href="http://drupal.org/cron">covers  cron in detail</a> with several methods for configuring it.</p>
<h2>7 – Disable CCK Content Permissions</h2>
<p>While this tip technically falls under tip 5, I figure it’s important  enough to be explicitly outlined. The CCK module comes with several  sub-modules. One of which is “Content Permissions”. This enables site  administrators to set permissions on a per-field basis. Unless your site  absolutely needs per-field permissions, this is a no-brainer to  disable.</p>
<p>The less permission checks your site has to run the better!</p>
<h2>8 – Disable Database Logging</h2>
<p>Again, another one that technically falls under tip 5, but I feel is  especially important is disabling the database logging module. This  module will log a wide variety of actions performed on the site to the  database. If you’re the only administrator, this module’s usefulness is  greatly reduced and should be turned off. Alternatively, you can enable  the syslog module which ships with core instead. This will write the  more technical log entries to the server’s standard log on the file  system and save the database queries.</p>
<h2>9 – Use a Third Party Comment System</h2>
<p>This one isn’t necessarily Drupal specific, but an easy way to  off-load quite a bit of processing on a popular site. Since Drupal’s  caching system is far more effective when only serving to anonymous  users, if the only reason you have user registration enabled is to allow  them to write comments, you may consider off-loading that task to a  free third party service like <a onclick="javascript:pageTracker._trackPageview('/outbound/article/intensedebate.com');" href="http://intensedebate.com/">Intense  Debate</a> or <a onclick="javascript:pageTracker._trackPageview('/outbound/article/disqus.com');" href="http://disqus.com/">Disqus</a>.  A small clip of javascript is all you need to include into your  template (or include it via a block), to embed a robust comment system  into your site. Also, if your visitors read other sites that use Intense  Debate or Disqus and already have an account (or use OpenID), they’ll  already have an account to comment on your site.</p>
<p>As of this writing, there is a <a onclick="javascript:pageTracker._trackPageview('/outbound/article/drupal.org');" href="http://drupal.org/project/disqus">published  module</a> to add Disqus support as well.</p>
<hr />Hopefully you find some of these simple tips helpful in keeping your  Drupal-powered site running at peak performance! When it comes to  scaling Drupal, these hints are only the tip of the iceberg. Drupal is  perfectly capable of supporting large, high-traffic websites with the  right environment in place, but we’ll save some of the more advanced  server-side tips for another post.</p>
<p><em><strong>Source: <a href="http://fenix-solutions.com/blog/2009/12/09/tips-for-improving-drupal-performance/" target="_blank">http://fenix-solutions.com/blog/2009/12/09/tips-for-improving-drupal-performance/</a></strong></em></p>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/' rel='bookmark' title='Permanent Link: Create multiple-step forms using CCK Fieldgroups in Drupal'>Create multiple-step forms using CCK Fieldgroups in Drupal</a> <small>Lately I&#8217;ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the...</small></li><li><a href='http://www.mikewagan.net/2009/10/working-paypal-module-for-prestashop/' rel='bookmark' title='Permanent Link: Working Paypal Module for Prestashop'>Working Paypal Module for Prestashop</a> <small>I just finished adding the Paypal payment option for our e-commerce site that uses Prestashop as the shopping cart application....</small></li><li><a href='http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/' rel='bookmark' title='Permanent Link: Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)'>Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</a> <small>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/</feedburner:origLink></item>
		<item>
		<title>Create multiple-step forms using CCK Fieldgroups in Drupal</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/5h6NoJdiXw4/</link>
		<comments>http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 06:15:35 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Drupal forms]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=330</guid>
		<description><![CDATA[Lately I&#8217;ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the people who will submit their contents to the site. A good solution would be to divide the submission form into different steps so that the form page would not be so crowded. Thanks to David [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/' rel='bookmark' title='Permanent Link: 9 Tips for Improving Drupal Performance'>9 Tips for Improving Drupal Performance</a> <small>I&#8217;ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also...</small></li><li><a href='http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/' rel='bookmark' title='Permanent Link: Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)'>Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</a> <small>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded....</small></li><li><a href='http://www.mikewagan.net/2009/07/prestashop-remove-default-shipping-fee-being-added-to-total-price-at-shopping-cart/' rel='bookmark' title='Permanent Link: Prestashop: Remove Default Shipping Fee Being Added To Total Price at Shopping Cart'>Prestashop: Remove Default Shipping Fee Being Added To Total Price at Shopping Cart</a> <small>If you&#8217;ve been developing e-commerce websites with Prestashop, one main problem that has not been solved in the latest release...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://www.davidnewkerk.com/files/img/multi-step-form.jpg" alt="multi-step-form.jpg" width="481" height="137" /></p>
<p>Lately I&#8217;ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the people who will submit their contents to the site. A good solution would be to divide the submission form into different steps so that the form page would not be so crowded. Thanks to David Newker for his solution on how to create muliple step forms using CCK Fieldgroups in Drupal. Here are the instructions I followed:</p>
<p><span id="more-330"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<div>
<p>By <span><a title="View user  profile." href="http://www.davidnewkerk.com/users/david">David</a></span> &#8211; Posted on <span>29 December  2008</span></div>
<div><!-- google_ad_section_start -->Several <a rel="nofollow" href="http://drupal.org/project/wizard">modules</a> and/or FormAPI techniques (<a rel="nofollow" href="http://drupal.org/node/101707">example 1</a>, <a rel="nofollow" href="http://drupal.org/node/162373">example 2</a>) exist that allow a <span>CCK</span> submission form to span multiple steps or pages, however the modules do  not currently work for Drupal 6, and the programming method is above  the ability for the average site admin to accomplish.</p>
<p>However, there&#8217;s one interesting method that harnesses the usefulness  of <span>CCK</span>&#8216;s &#8220;Fieldgroup&#8221; sub-module, paired with  a few other key modules and settings, to give the effect of a  multi-step/page form. This is by no means a perfect solution or  applicable to every situation, but in some cases, it should  be sufficient.</p>
<h2>Modules needed</h2>
<p>Ensure that you have the following modules installed in order to  follow along with this guide:</p>
<ul>
<li><a rel="nofollow" href="http://drupal.org/project/cck"><span>CCK</span></a></li>
<li><span>CCK</span> Fieldgroup (a sub-module which comes  with <span>CCK</span>)</li>
<li><a rel="nofollow" href="http://drupal.org/project/cck_fieldgroup_tabs"><span>CCK</span> Fieldgroup Tabs</a></li>
<li><a rel="nofollow" href="http://drupal.org/project/tabs">jQuery <span>UI</span> Tabs</a> (Drupal 6 only)</li>
<li><a rel="nofollow" href="http://drupal.org/project/jstools">Javascript  Tools Tabs</a> (Drupal 5 only)</li>
<li><a rel="nofollow" href="http://drupal.org/project/auto_nodetitle">Automatic Nodetitles</a></li>
<li><a rel="nofollow" href="http://drupal.org/project/token">Token</a></li>
<li><a rel="nofollow" href="http://drupal.org/project/saveguard">SaveGuard</a> (optional)</li>
</ul>
<h2>Set up the Tabs module</h2>
<ol>
<li>Go to the Tabs settings page at <strong>Administer &gt; Site  configuration &gt; Tabs</strong> <em>(admin/settings/tabs).</em></li>
<li>Since it helps visually reinforce the change from one set of form  fields to another, I suggest turning on either the <em>Slide effect</em> or the <em>Fade effect</em> (but not both).</li>
<li>Choose either the slow or fast <em>Effect speed</em>.</li>
<li>Set the <em>Navigation buttons</em> option to <code>enabled</code>,  and if you prefer the <em>Next</em> and <em>Previous</em> navigation  buttons to have capitalized names or use different wording, adjust the  text here. When you&#8217;ve completed these settings, press  &#8220;Save configuration&#8221;.</li>
</ol>
<h2>Create your multi-step content type</h2>
<ol>
<li>Begin by creating your new <span>CCK</span> type at <strong>Administer  &gt; Content management &gt; Content types &gt; Add content type</strong> <em>(admin/content/types/add)</em>.</li>
<li>Unless you have a reason to keep it, expand the &#8220;Submission form  settings&#8221; fieldset and remove the <em>Body</em> field, as if you keep  it, it will stay visible on every page of the form.</li>
<li>By default, the Title field will show on every page as well; if  you&#8217;d rather not have the Title visible, a solution is to install the <a rel="nofollow" href="http://drupal.org/project/auto_nodetitle">Automatic  Nodetitles</a> module, which will allow you to generate a Title based  on pre-determined settings (or tokens if you have <a rel="nofollow" href="http://drupal.org/project/token">Token</a> module  installed), or on the content of another field of the form. All Drupal  nodes &#8220;must&#8221; have a Title, and Automatic Nodetitles allows you to meet  this requirement while allowing you to hide the Title field. Once you&#8217;ve  installed Automatic Nodetitles module, an &#8220;Automatic title generation&#8221;  option will appear at the top of every content type&#8217;s main configuration  page. Set this option to <em>Automatically generate the title and hide  the title field</em>, and expand the &#8220;Replacement patterns&#8221; fieldset to  see what options you can set for the Title. One possible example of what  you could set this to might be: <code>[author-name-raw] [mm]-[dd]-[yy]</code> (Author&#8217;s name + the submission date). After you&#8217;ve added custom fields  to the content type, you can also come back to this setting and use the  <em><span>CCK</span> text tokens</em> options, which allow  you to choose any other fields from the content type (for instance if  one of your form fields asks for the person&#8217;s name, you can use the name  they type in your Title.</li>
<li>If you&#8217;d like to include a description or help text above the form,  which will show on every page/step of the form, add that text to the <em>Explanation  or submission guidelines</em> field.</li>
<li>Expand the &#8220;Workflow settings&#8221; fieldset and uncheck the <em>Promoted  to front page</em> option. Also expand the &#8220;Comment settings&#8221; fieldset  and choose your comment settings for this content type. If this content  type is meant for data collection rather than public pages, you&#8217;ll  probably want to disable comments.</li>
<li>Click the &#8220;Save content type&#8221; button to proceed.</li>
</ol>
<h2>Create Fieldgroups and Fields for your <span>CCK</span> type</h2>
<ol>
<li>Click on the &#8220;Manage fields&#8221; link or tab for your new content type.  It doesn&#8217;t matter whether you create the fields of your form first, or  create one or more of the separate Fieldgroups which will become the  pages/steps of your form. If you&#8217;re starting a form from scratch,  probably the best way to keep things organized and uncluttered would be  to create each Fieldgroup as it comes time to make another page of the  form. When naming Fieldgroups, choose short and to-the-point names  (remember that the names will have to fit inside of the tabs). Unless  descriptive names are required, consider simply naming the Step 1, Step  2, etc. To make a new Fieldgroup in Drupal 6, under the <em>New group</em> area of the Manage fields page, enter a Label (which can be slightly  longer and capitalized), and a short group_field name. If you&#8217;d like,  you can drag and drop the group into your preferred order before you  even save it. When ready, press &#8220;Save&#8221;. In Drupal 5, make a new  Fieldgroup by clicking on the &#8220;Add Group&#8221; link/tab.</li>
<li>Once you&#8217;ve created one or more Fieldgroups and one or more fields,  you can begin adding the fields into the appropriate Fieldgroups. The  way to add a field to a group in Drupal 6 is simply to drag and drop the  field below and to the right of a Fieldgroup. When you do this, the  field&#8217;s name will be indented to show visually that it is within a given  Fieldgroup. In Drupal 5, you need to select the Fieldgroup you&#8217;d like  to use for each field from the <em>Group</em> down-down list. In Drupal  6, you can drag and drop Fieldgroups to change their order, and all  fields within a group stay in the group as you move it (in Drupal 5, use  the <em>Weight</em> option for each Fieldgroup to adjust their order).</li>
<li>After you create a Fieldgroup in Drupal 6 (or &#8220;as&#8221; you create a  Fieldgroup in Drupal 5), you need to configure the Fieldgroup&#8217;s <em>Style</em> setting. In Drupal 6, click on the &#8220;configure&#8221; link next to the  Fieldgroup and choose the <code>tabs</code> option for the <em>Style</em> setting. In Drupal 5, the <em>Style</em> setting is available while you  create the Fieldgroup, and is also available from the Fieldgroup&#8217;s  &#8220;configure&#8221; link. While configuring the Fieldgroup, you can also enter <em>Help</em> text which will be shown at the top of that &#8220;page&#8221; of the form.</li>
</ol>
<h2>Changing the tabs to Vertical tabs</h2>
<p>If you prefer horizontal tabs, then skip this step. However, if you  have more than a few steps in your form, the number of horizontal tabs  is likely to span more than the width of your site&#8217;s layout, and will  begin to stack on top of each other in a rather unappealing manner. In  this case, vertical tabs that run along the side of the form are a  better choice.</p>
<p>Fortunately this can be accomplished using just some <span>CSS</span> to override and change the position of the tabs.  This is a bit of a messy way to do this, but it will work for now; the  next release of Tabs module will evidently come with a vertical tabs  option by default. Open the <em>style.css</em> file of your theme and  add the following code to override the default horizontal tab layout  (this works for certain with the standard Garland theme, but may require  adjustments for other themes):</p>
<div><code>/* Turns off the clear:both in the  span from Tabs module's drupal-tabs.css,<br />
so the form will float to  the right of the tabs */<br />
#tabs-fieldgroup_tabs span.clear {<br />
clear: none;<br />
}</p>
<p>/* Sets spacing between the tabs and the form  */<br />
#tabs-fieldgroup_tabs ul.primary {<br />
margin: 0 20px 0 0;<br />
}</p>
<p>/*  Makes tabs vertical and sets padding below each */<br />
#tabs-fieldgroup_tabs  ul.primary li {<br />
margin: 0;<br />
padding: 0 0 12px 0;<br />
display:  block;<br />
}</p>
<p>/* Prevents the form fields from wrapping under the  vertical tabs */<br />
.node-form .ui-tabs-panel {<br />
float: left;<br />
}</p>
<p>/*  Clears the float so the Save <span>&amp;</span> Preview  buttons stay below the form */</p>
<p>.node-form div.admin {<br />
clear: both;<br />
}</p>
<p>/* Ensures the float clears when the admin is  viewing the page too */<br />
.node-form fieldset {<br />
clear: both;<br />
}</p>
<p>/*  More tasteful separator line before prev/next buttons*/<br />
.tabs-nav-link-sep  {<br />
border-top: 1px #<span>E2E2E2</span> solid;<br />
margin-top: 10px;<br />
margin-bottom: 10px<br />
}</p>
<p>/* Overriding  Tabs module's drupal-tabs.css, more tasteful prev/next buttons */<br />
.tabs-nav-previous,  .tabs-nav-next {<br />
font-size: 12px;<br />
font-weight: normal;<br />
float: left;<br />
border: 1px solid #<span>ADADAD</span>;<br />
padding: 1px 7px;<br />
margin-bottom: 5px;<br />
cursor: pointer;<br />
background-color: #<span>E2E2E2</span>;<br />
}</p>
<p></code><code>/*  Changes hover state of the prev/next buttons */<br />
a:hover.tabs-nav-previous,  a:hover.tabs-nav-next {<br />
text-decoration: none;<br />
color: #<span>FFFFFF</span>;<br />
}</code></div>
<h2 id="avoid-data-loss">Avoiding accidental data loss</h2>
<p>Since the pages/steps of this form are actually still part of a  single <span>CCK</span> form, the data of one step is not  yet saved when proceeding to the next step (it is still there, but is  hidden while the next step of the form is shown). It&#8217;s possible that an  end-user of the form may misunderstand or possibly forget that the form  has not been saved, and navigate away from the page, losing all of the  data they&#8217;ve entered. As a multi-step form such as this is likely to be a  substantial amount of data, avoiding a loss like this is important.</p>
<p>One solution to help avoid this problem is the <a rel="nofollow" href="http://drupal.org/project/saveguard">SaveGuard</a> module. If the form has been modified, SafeGuard displays a warning  message if the user attempts to navigate away from the page before  saving. Simply enable the module, add a custom message if desired, and  it immediately begin its task of helping users avoid accidental  data loss.</p>
<p>Another similar but more robust solution to consider is <a rel="nofollow" href="http://drupal.org/project/autosave">AutoSave</a> module.</p>
<p><strong><em>Source: </em></strong><a href="http://www.davidnewkerk.com/book/106"><strong><em>www.davidnewkerk.com</em></strong></a></div>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2010/03/9-tips-for-improving-drupal-performance/' rel='bookmark' title='Permanent Link: 9 Tips for Improving Drupal Performance'>9 Tips for Improving Drupal Performance</a> <small>I&#8217;ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also...</small></li><li><a href='http://www.mikewagan.net/2010/07/drupal-how-to-diagnose-a-blank-white-screen-white-screen-of-death-wsod/' rel='bookmark' title='Permanent Link: Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)'>Drupal &#8211; How to Diagnose a Blank White Screen: White Screen of Death (WSOD)</a> <small>While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded....</small></li><li><a href='http://www.mikewagan.net/2009/07/prestashop-remove-default-shipping-fee-being-added-to-total-price-at-shopping-cart/' rel='bookmark' title='Permanent Link: Prestashop: Remove Default Shipping Fee Being Added To Total Price at Shopping Cart'>Prestashop: Remove Default Shipping Fee Being Added To Total Price at Shopping Cart</a> <small>If you&#8217;ve been developing e-commerce websites with Prestashop, one main problem that has not been solved in the latest release...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/03/create-multiple-step-forms-using-cck-fieldgroups-in-drupal/</feedburner:origLink></item>
		<item>
		<title>Free MP3 Music Streaming from GrooveShark</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/mrD4_lTqRxs/</link>
		<comments>http://www.mikewagan.net/2010/03/free-mp3-music-streaming-from-grooveshark/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 06:05:02 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[free music streaming]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=325</guid>
		<description><![CDATA[I was hooked up with Last.fm before when it was still a free mp3 music streaming site since I needed some get-up music to give a little nudge on that late night graveyard web designing schedule. But then they started to charge monthly fees and that is totally a killer to my free music lifestyle. [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2009/02/six-music-six-videos-six-pictures-for-free/' rel='bookmark' title='Permanent Link: Six Music, Six Videos, Six Pictures&#8230; FOR FREE'>Six Music, Six Videos, Six Pictures&#8230; FOR FREE</a> <small>So what&#8217;s with the title? The number six is a lucky number for me today, and I think I&#8217;ll blog...</small></li><li><a href='http://www.mikewagan.net/2009/06/4-free-tools-to-add-watermarks-to-images/' rel='bookmark' title='Permanent Link: 4 Free Tools To Add Watermarks To Images or Pictures'>4 Free Tools To Add Watermarks To Images or Pictures</a> <small>One popular way to avoid people stealing your online pictures is by adding a watermark on them; those translucent texts...</small></li><li><a href='http://www.mikewagan.net/2008/11/eraserheads-the-reunion-concert-free-download/' rel='bookmark' title='Permanent Link: Eraserheads The Reunion Concert Free Download'>Eraserheads The Reunion Concert Free Download</a> <small>Want to download the CD version of the Eraserheads reunion concert? Here&#8217;s a link where you can download the best...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="  aligncenter" title="free mp3 live stream music streaming grooveshark grooveshark.com" src="http://news.cnet.com/i/bto/20091113/Grooveshark_PhishExile_610x495.JPG" alt="GrooveShark.com - Absolutely FREE Music Streaming" width="488" height="396" /></p>
<p>I was hooked up with Last.fm before when it was still a free mp3 music streaming site since I needed some get-up music to give a little nudge on that late night graveyard web designing schedule. But then they started to charge monthly fees and that is totally a killer to my free music lifestyle.</p>
<p>Then came <a href="http://www.grooveshark.com" target="_blank">GrooveShark.com</a>, and I think its absolutely<strong> the best music streaming site </strong>ever! Why? <span id="more-325"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
<br />
First, its got a Flash-based interface so you got some nice but user-friendly controls, and the site design is really cool too (I like the orange-black combination). You can play the most popular songs on one click, or search for a song or an artist and build your playlist from scratch. Also, you can even upload you own mp3s to complete your playlist. And best of all: its <strong>totally FREE</strong> (as in free music streaming! But at least for now, it is).</p>
<p>If you&#8217;re a sucker for free music, do check it out!<strong> </strong><a href="http://listen.grooveshark.com" target="_blank"><strong>Grooveshark.com</strong></a></p>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2009/02/six-music-six-videos-six-pictures-for-free/' rel='bookmark' title='Permanent Link: Six Music, Six Videos, Six Pictures&#8230; FOR FREE'>Six Music, Six Videos, Six Pictures&#8230; FOR FREE</a> <small>So what&#8217;s with the title? The number six is a lucky number for me today, and I think I&#8217;ll blog...</small></li><li><a href='http://www.mikewagan.net/2009/06/4-free-tools-to-add-watermarks-to-images/' rel='bookmark' title='Permanent Link: 4 Free Tools To Add Watermarks To Images or Pictures'>4 Free Tools To Add Watermarks To Images or Pictures</a> <small>One popular way to avoid people stealing your online pictures is by adding a watermark on them; those translucent texts...</small></li><li><a href='http://www.mikewagan.net/2008/11/eraserheads-the-reunion-concert-free-download/' rel='bookmark' title='Permanent Link: Eraserheads The Reunion Concert Free Download'>Eraserheads The Reunion Concert Free Download</a> <small>Want to download the CD version of the Eraserheads reunion concert? Here&#8217;s a link where you can download the best...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/03/free-mp3-music-streaming-from-grooveshark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/03/free-mp3-music-streaming-from-grooveshark/</feedburner:origLink></item>
		<item>
		<title>How to optimize GoDaddy Virtual Private Server – Kill Tomcat &amp; Simple Control Panel</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/bl3IACTq6-c/</link>
		<comments>http://www.mikewagan.net/2010/03/how-to-optimize-godaddy-virtual-private-server-kill-tomcat-simple-control-panel/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 05:47:41 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Godaddy VPS]]></category>
		<category><![CDATA[server optimization]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=322</guid>
		<description><![CDATA[While searching for some optimization tips for Virtual Private Servers, I checked out this post which claimed that Godaddy (ahem) VPS sucked BUT offering a solution to those who were on the same boat (in this case, I).  Luckily, I tried out his solution and it has proven to speed up the Godaddy VPS. To [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2009/11/how-to-completely-backup-your-godaddy-website-files/' rel='bookmark' title='Permanent Link: How To Completely Backup your GoDaddy Website Files'>How To Completely Backup your GoDaddy Website Files</a> <small>Godaddy mainly offers domain names for sale, but they are also selling hosting plans including shared hosting, VPS and dedicated...</small></li><li><a href='http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/' rel='bookmark' title='Permanent Link: How to Install/Recompile MCRYPT in PHP (CentOS VPS)'>How to Install/Recompile MCRYPT in PHP (CentOS VPS)</a> <small>I&#8217;m starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop....</small></li><li><a href='http://www.mikewagan.net/2008/10/how-to-repair-corrupted-mysql-tables-in-linux/' rel='bookmark' title='Permanent Link: How To Repair Corrupted MySQL Tables in Linux'>How To Repair Corrupted MySQL Tables in Linux</a> <small>I had this problem for days and can&#8217;t find a solution. What I had was .frm, .MYD and .MYI backup...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>While searching for some <strong>optimization tips</strong> for <strong>Virtual Private Servers</strong>, I checked out <a href="http://www.colinmcnamara.com/why-godaddy-linux-virtual-dedicated-hosting-sucks-how-to-fix-it/" target="_blank">this post</a> which claimed that <strong>Godaddy</strong> (ahem) VPS sucked BUT offering a solution to those who were on the same boat (in this case, I).  Luckily, I tried out his solution and it has proven to <strong>speed up the Godaddy VPS. </strong></p>
<p><strong> </strong>To give an overview of our setup, we have a few (like 20 ?) websites hosted on the GoDaddy server and its occasionally bugging down. One optimization I did was to kill some processes that are not needed most of the time which takes up a few MBs of RAM from the server.</p>
<p>So here is the solution that I implemented on the said VPS as suggested by <a href="http://www.colinmcnamara.com/why-godaddy-linux-virtual-dedicated-hosting-sucks-how-to-fix-it/" target="_blank">Colin McNamara</a> &#8211; basically to stop the Apache Tomcat and Godaddy Simple Control Panel, which are used very rarely. But of course, if you need to use the Simple Control Panel, you can always start it up again then turn it off when you are done.</p>
<p>Here are the steps: <span id="more-322"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">If you are on Windows use the following procedure to get shell access to your GoDaddy VDS -<br style="padding: 0px; margin: 0px;" /></span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">you will want to download a ssh client called putty – <a style="color: #0060ff; text-decoration: underline; padding: 0px; margin: 0px;" title="putty download" href="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe" target="_blank">Download Here</a></li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Copy this file to your desktop, double click putty.exe , and you should see something like this -</li>
</ul>
<p style="text-align: center; "><a style="color: #0060ff; text-decoration: underline; padding: 0px; margin: 0px;" rel="singlepic73" href="http://www.colinmcnamara.com/wp-content/gallery/godaddy-sucks/putty-initial.jpg"><img class="aligncenter" style="background-color: #ffffff; display: block; padding: 4px; margin: 0px; border: initial none initial;" title="putty-initial.jpg" src="http://www.colinmcnamara.com/wp-content/gallery/cache/73__320x240_putty-initial.jpg" alt="putty-initial.jpg" /></a></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">In the host name field I have www.<em>yourdomain</em>.com . replace <em>yourdomain</em>with your domain name.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Click on the open button on the bottom right, and a shell should pop up, along with a warning that looks like this (you can click OK to the warning)</li>
</ul>
<p style="text-align: center; "><a style="color: #0060ff; text-decoration: underline; padding: 0px; margin: 0px;" rel="singlepic74" href="http://www.colinmcnamara.com/wp-content/gallery/godaddy-sucks/putty2-security-key.jpg"><img class="aligncenter" style="background-color: #ffffff; display: block; padding: 4px; margin: 0px; border: initial none initial;" title="putty2-security-key.jpg" src="http://www.colinmcnamara.com/wp-content/gallery/cache/74__320x240_putty2-security-key.jpg" alt="putty2-security-key.jpg" /></a></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Now skip past the linux section</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">If you are running Linux or Unix start here -</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Open up a command line terminal</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">ssh using your godaddy simple control panel username example -</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">ssh your-godaddy-control-panel-username@www.yourdomain.com</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">If this is your first time connecting to this server, you will be prompted to accept an unkown ssh key into known_hosts, choose yes to accept</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">Both Windows, Linux and Unix Continue Here –</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Enter your the password you use to access your GoDaddy Simple Control Panel Interface</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">You will be presented with what looks like a DOS window, this is called a secure shell terminal. Type in the username you use to access your Godaddy Simple Control Panel and then hit enter</li>
</ul>
<p style="text-align: center; "><a style="color: #0060ff; text-decoration: underline; padding: 0px; margin: 0px;" rel="singlepic76" href="http://www.colinmcnamara.com/wp-content/gallery/godaddy-sucks/godaddy-password.jpg"><img class="aligncenter" style="background-color: #ffffff; display: block; padding: 4px; margin: 0px; border: initial none initial;" title="godaddy-password.jpg" src="http://www.colinmcnamara.com/wp-content/gallery/cache/76__320x240_godaddy-password.jpg" alt="godaddy-password.jpg" /></a></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Now type in the password that you use to access your Simple Control Panel Interface and hit enter</li>
</ul>
<p style="text-align: center; "><a style="color: #0060ff; text-decoration: underline; padding: 0px; margin: 0px;" rel="singlepic75" href="http://www.colinmcnamara.com/wp-content/gallery/godaddy-sucks/godaddy-putty-username-pass.jpg"><img class="aligncenter" style="background-color: #ffffff; display: block; padding: 4px; margin: 0px; border: initial none initial;" title="godaddy-putty-username-pass.jpg" src="http://www.colinmcnamara.com/wp-content/gallery/cache/75__320x240_godaddy-putty-username-pass.jpg" alt="godaddy-putty-username-pass.jpg" /></a></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Congratulations, if you see the window below you are now shelled into your virtual dedicated server.</li>
</ul>
<p style="text-align: center; "><a style="color: #0060ff; text-decoration: underline; padding: 0px; margin: 0px;" rel="singlepic72" href="http://www.colinmcnamara.com/wp-content/gallery/godaddy-sucks/putty-login-success.jpg"><img class="aligncenter" style="background-color: #ffffff; display: block; padding: 4px; margin: 0px; border: initial none initial;" title="putty-login-success.jpg" src="http://www.colinmcnamara.com/wp-content/gallery/cache/72__320x240_putty-login-success.jpg" alt="putty-login-success.jpg" /></a></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">Change to the Root user</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Now that you are shelled into a Linux device you need to escalate your privileges to get administrator level access. In the Unix world this user is known as Root. You can change to this user, and get full system privileges by using the following command.</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">su – root</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">You will be presented with a password prompt, enter in the same password that you have used to log into your Simple Control Panel Interface</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">You are now root, be careful with what command you enter under this user, as you can do some damage if you are careless</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">Clean out your servers memory</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Most recent Redhat direvatives (including Centos) utilize a tool called yum to add and remove packages. This is also true with your linux servers at GoDaddy.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">you need to install a tool called memhog, it is part of a package called numactl that is normally used to assign specific process’s to specific cpu’s in a multi-core system. We will be using it today to fix GoDaddy’s memory hogging application</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">yum install numactl</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">choose yes to all the prompts, and numactl will automatically be downloaded and installed on your server</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">Stop GoDaddy Simple Control Panel, and Tomcat, and tell them not to start automatically when your server restarts.</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Tomcat is a special type of webserver for Java based applications. Godaddy uses it to run their control panel interface. 99.99999 percent of users will not need to use Tomcat. If you do need to use Tomcat then you are a technical user and will know what to do.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">In Linux, server applications are called daemons. The are executed by init scripts. We will use these scripts to turn off these server applications</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Turn off the TurboPanel daemon ( this is the process that runs your simple control panel web interface</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">/etc/init.d/turbopanel stop</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Next we need to turn off Tomcat</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">/etc/init.d/tomcat55 stop</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Now that we have these services turned off, we need to make sure that they don’t come back when we reboot the server. We can do this by using the chkconfig command.</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Stop the Simple Control Panel Interface from starting automatically by executing the following command</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">chkconfig turbopanel off</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Stop the Tomcat server from starting automatically by executing the following command</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">chkconfig tomcat55 off</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">Clean the mess GoDaddy made of your servers memory</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">A couple steps back we installed numactl. The executable we wanted out of this package is memhog. Issue the following command to take your memory back. This command will overwrite 200 megabytes of your memory, allowing the rest of your applications to get access to that memory.</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">memhog 200m</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">This will Clear out the memory that GoDaddy’s application took over, and allow the rest of your daemons to run fine.</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><span style="font-size: 14pt; padding: 0px; margin: 0px;">Great, my server is running better now. But I want to use my Simple Control Panel Interface. How do I do that?</span></p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Easy, all you need to do is temporarily start the turbopanel daemon. When you are done making changes, you can turn it off again</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">/etc/init.d/tomcat55 start</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">/etc/init.d/turbopanel start</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 40px; list-style-type: square; padding: 0px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">When you are done, don’t forget to turn it off</li>
</ul>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">/etc/init.d/turbopanel stop</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">/etc/init.d/tomcat55 stop</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">********************************</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">NOTE: if you cannot locate <em>chckconfig</em>, try adding /sbin, like:</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><em>/sbin/chkconfig turbopanel off</em> (and)<br style="padding: 0px; margin: 0px;" /><em>/sbin/chkconfig tomcat55 off</em></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;">I hope this solution would work for you too!</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding: 0px;"><em>Source: </em><a href="http://www.colinmcnamara.com/why-godaddy-linux-virtual-dedicated-hosting-sucks-how-to-fix-it/" target="_blank"><em>Why GoDaddy Linux Virtual Dedicated Hosting Sucks &amp; How to Fix It</em></a></p>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2009/11/how-to-completely-backup-your-godaddy-website-files/' rel='bookmark' title='Permanent Link: How To Completely Backup your GoDaddy Website Files'>How To Completely Backup your GoDaddy Website Files</a> <small>Godaddy mainly offers domain names for sale, but they are also selling hosting plans including shared hosting, VPS and dedicated...</small></li><li><a href='http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/' rel='bookmark' title='Permanent Link: How to Install/Recompile MCRYPT in PHP (CentOS VPS)'>How to Install/Recompile MCRYPT in PHP (CentOS VPS)</a> <small>I&#8217;m starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop....</small></li><li><a href='http://www.mikewagan.net/2008/10/how-to-repair-corrupted-mysql-tables-in-linux/' rel='bookmark' title='Permanent Link: How To Repair Corrupted MySQL Tables in Linux'>How To Repair Corrupted MySQL Tables in Linux</a> <small>I had this problem for days and can&#8217;t find a solution. What I had was .frm, .MYD and .MYI backup...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/03/how-to-optimize-godaddy-virtual-private-server-kill-tomcat-simple-control-panel/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/03/how-to-optimize-godaddy-virtual-private-server-kill-tomcat-simple-control-panel/</feedburner:origLink></item>
		<item>
		<title>Allow Div Layers to Float over Flash, Youtube or Vimeo Videos</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/J44sHNU8gQ0/</link>
		<comments>http://www.mikewagan.net/2010/02/allow-div-layers-to-float-over-flash-youtube-or-vimeo-videos/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 15:11:01 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[youtube vimeo flash]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=317</guid>
		<description><![CDATA[For web designers, its always a constant struggle to get those flash, youtube, or vimeo videos tuck under divs where you need them. They somehow always behave like their z-index is close to infinity. By default Flash content in a web page will appear on top of other elements on the page, including floating menus, [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2009/02/super-bowl-2009-videos/' rel='bookmark' title='Permanent Link: Super Bowl 2009 Videos'>Super Bowl 2009 Videos</a> <small>I have here a collection of the 2009 super bowl videos which I would like to share to you. Cracked.com...</small></li><li><a href='http://www.mikewagan.net/2008/10/please-dont-watch-this-video/' rel='bookmark' title='Permanent Link: Please Don&#8217;t Watch This Video!'>Please Don&#8217;t Watch This Video!</a> <small>This was me two years ago nung adik pa ako sa gitara at pagbabanda. Ampanget ko dito, hehehe&#8230; Just a...</small></li><li><a href='http://www.mikewagan.net/2008/10/first-solid-food-ni-jian/' rel='bookmark' title='Permanent Link: First Solid Food ni Jian'>First Solid Food ni Jian</a> <small>Eto ang unang try ni Jian sa pagkain ng solid food. Five months sya kumain ng first solid food (malambot...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>For web designers, its always a constant struggle to get those flash, youtube, or vimeo videos tuck under divs where you need them. They somehow always behave like their z-index is close to infinity.</p>
<p>By default Flash content in a web page will appear on top of other elements on the page, including floating menus, inline popups etc. This can be pretty annoying if you have a flyout menu on your page and it goes behind the Flash video and this post shows how simple it is to fix. This works in all browsers inclding IE6+<span id="more-317"></span>
<center>
<table><tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 336x280, created 8/4/09 mikewagan.net */
google_ad_slot = "3873552827";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td><td>
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4709798263732366";
/* 160x90, created 10/8/09 mikewagan.net */
google_ad_slot = "0020347340";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>
</center>
</p>
<p>The first screenshot below shows the default behaviour where the  floating menu appears behind the Vimeo Flash video:</p>
<div style="text-align: center;"><img src="http://www.electrictoolbox.com/images/content/embed-transparent-off.jpg" alt="embedded flash media player without  transparency" width="396" height="270" /></div>
<p>The second screenshot below shows the desired behavioiur where the  floating menu appears on top of the video:</p>
<div style="text-align: center;"><img src="http://www.electrictoolbox.com/images/content/embed-transparent-on.jpg" alt="embedded flash media player with  transparency" width="396" height="270" /></div>
<div style="text-align: left;"><strong>THE SOLUTION:</strong></div>
<p>The following &lt;param&gt; should be added within the  &lt;object&gt;:</p>
<pre>&lt;param name="wmode" value="transparent" /&gt;</pre>
<p>And the following should be added into the &lt;embed&gt; tag:</p>
<pre>wmode="transparent"</pre>
<p>The end result will be something along these lines:</p>
<pre>&lt;object width="400" height="300"&gt;
  &lt;param name="wmode" value="transparent" /&gt;
  &lt;param value="true" name="allowfullscreen" /&gt;
  &lt;param value="always" name="allowscriptaccess" /&gt;
  &lt;param name="movie" value="..." /&gt;
  &lt;embed width="400" height="300" allowscriptaccess="always"
    allowfullscreen="true" type="application/x-shockwave-flash"
    src="..." wmode="transparent"&gt;
  &lt;/embed&gt;
&lt;/object&gt;</pre>
<p>Now floating content will appear above the video.</p>
<p><em>Source: </em><a href="http://www.electrictoolbox.com/div-layers-float-over-flash-vimeo-youtube/" target="_blank"><em>ElectricToolbox.com</em></a></p>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2009/02/super-bowl-2009-videos/' rel='bookmark' title='Permanent Link: Super Bowl 2009 Videos'>Super Bowl 2009 Videos</a> <small>I have here a collection of the 2009 super bowl videos which I would like to share to you. Cracked.com...</small></li><li><a href='http://www.mikewagan.net/2008/10/please-dont-watch-this-video/' rel='bookmark' title='Permanent Link: Please Don&#8217;t Watch This Video!'>Please Don&#8217;t Watch This Video!</a> <small>This was me two years ago nung adik pa ako sa gitara at pagbabanda. Ampanget ko dito, hehehe&#8230; Just a...</small></li><li><a href='http://www.mikewagan.net/2008/10/first-solid-food-ni-jian/' rel='bookmark' title='Permanent Link: First Solid Food ni Jian'>First Solid Food ni Jian</a> <small>Eto ang unang try ni Jian sa pagkain ng solid food. Five months sya kumain ng first solid food (malambot...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/02/allow-div-layers-to-float-over-flash-youtube-or-vimeo-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/02/allow-div-layers-to-float-over-flash-youtube-or-vimeo-videos/</feedburner:origLink></item>
		<item>
		<title>How to Install/Recompile MCRYPT in PHP (CentOS VPS)</title>
		<link>http://feedproxy.google.com/~r/MikeWaganDotNet/~3/oIXqEiuj4mk/</link>
		<comments>http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 02:58:22 +0000</pubDate>
		<dc:creator>Mike Wagan</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Godaddy VPS]]></category>
		<category><![CDATA[MCRYPT]]></category>

		<guid isPermaLink="false">http://www.mikewagan.net/?p=312</guid>
		<description><![CDATA[I&#8217;m starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop. I suggest people who want a better system than Prestashop to checkout the Interspire Shopping Cart, its worth every penny. So I&#8217;m setting it up for our company in a VPS hosting, and it requires [...]


Related posts:<ol><li><a href='http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/' rel='bookmark' title='Permanent Link: How to Upgrade PHP to 5.2 in CentOS'>How to Upgrade PHP to 5.2 in CentOS</a> <small>Developing a Drupal community site has been really good for a while until I needed to search a module to...</small></li><li><a href='http://www.mikewagan.net/2009/11/how-to-completely-backup-your-godaddy-website-files/' rel='bookmark' title='Permanent Link: How To Completely Backup your GoDaddy Website Files'>How To Completely Backup your GoDaddy Website Files</a> <small>Godaddy mainly offers domain names for sale, but they are also selling hosting plans including shared hosting, VPS and dedicated...</small></li><li><a href='http://www.mikewagan.net/2010/03/how-to-optimize-godaddy-virtual-private-server-kill-tomcat-simple-control-panel/' rel='bookmark' title='Permanent Link: How to optimize GoDaddy Virtual Private Server &#8211; Kill Tomcat &#038; Simple Control Panel'>How to optimize GoDaddy Virtual Private Server &#8211; Kill Tomcat &#038; Simple Control Panel</a> <small>While searching for some optimization tips for Virtual Private Servers, I checked out this post which claimed that Godaddy (ahem)...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting to develop sites with the <a href="http://www.interspire.com/shoppingcart/" target="_blank">Interspire Shopping Cart</a> system, which I think is totally way better than Prestashop. I suggest people who want a better system than Prestashop to checkout the Interspire Shopping Cart, its worth every penny.</p>
<p>So I&#8217;m setting it up for our company in a VPS hosting, and it requires the PHP installation to be compiled with MCRYPT package. Specifically, this is needed for the manual credit card processing module. And it seems that the Godaddy VPS support is NOT willing to support (ironic) so I had to deal with the challenge myself. I found this instructions from <a href="http://www.notesbit.com/index.php/web-mysql/web-scripts/how-to-install-mcrypt-in-linux-cent-os-and-recompile-php/">NotesBit.com</a> on how to recompile PHP with MCRYPT support. Here are the steps I followed &#8211; it was actually easier than I thought: <span id="more-312"></span><strong></strong></p>
<p><strong>1. Install libmcrypt</strong><span> (2.5.x or better) <a href="http://mcrypt.hellug.gr/lib/index.html">http://mcrypt.hellug.gr/lib/index.html</a></span></p>
<blockquote><p>-download and uncompress: tar z -xvf xxx.tar.gz<br />
-cd into libmcrypt dir and type: ./configure<br />
-when configure is done type: make<br />
-when make is done type: make install</p></blockquote>
<p><strong>2. Add the library dir to /etc/ld.so.conf</strong></p>
<blockquote><p>-edit /etc/ld.so.conf and add: /usr/local/lib<br />
-save file and then type the command: ldconfig</p></blockquote>
<p><strong>3. Install mcrypt &amp; mhash (enter these commands)<br />
</strong></p>
<blockquote><p>yum install mcrypt*<br />
yum install mhash*</p></blockquote>
<p><strong>4. Enable support for php. requires php-mcrypt and php-mhash packages (enter these commands):</strong></p>
<blockquote><p>yum install php-mcrypt*<br />
yum install php-mhash*</p></blockquote>
<p><strong>5. Restart Apache</strong></p>
<blockquote><p>/sbin/service httpd restart</p></blockquote>
<p>The VPS we are using is from Godaddy. Latest Apache and PHP versions. Let me know if this works for you!</p>


<p>Related posts:<ol><li><a href='http://www.mikewagan.net/2010/04/upgrade-php-to-5-2-in-centos/' rel='bookmark' title='Permanent Link: How to Upgrade PHP to 5.2 in CentOS'>How to Upgrade PHP to 5.2 in CentOS</a> <small>Developing a Drupal community site has been really good for a while until I needed to search a module to...</small></li><li><a href='http://www.mikewagan.net/2009/11/how-to-completely-backup-your-godaddy-website-files/' rel='bookmark' title='Permanent Link: How To Completely Backup your GoDaddy Website Files'>How To Completely Backup your GoDaddy Website Files</a> <small>Godaddy mainly offers domain names for sale, but they are also selling hosting plans including shared hosting, VPS and dedicated...</small></li><li><a href='http://www.mikewagan.net/2010/03/how-to-optimize-godaddy-virtual-private-server-kill-tomcat-simple-control-panel/' rel='bookmark' title='Permanent Link: How to optimize GoDaddy Virtual Private Server &#8211; Kill Tomcat &#038; Simple Control Panel'>How to optimize GoDaddy Virtual Private Server &#8211; Kill Tomcat &#038; Simple Control Panel</a> <small>While searching for some optimization tips for Virtual Private Servers, I checked out this post which claimed that Godaddy (ahem)...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.mikewagan.net/2010/01/how-to-install-recompile-mcrypt-in-php-centos-vps/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 2.664 seconds --><!-- Cached page generated by WP-Super-Cache on 2010-07-23 09:21:27 -->
