<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Colin Godsey &#187; PHP</title>
	<atom:link href="http://www.colingodsey.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.colingodsey.com</link>
	<description>CRG Studios &#38; Consulting</description>
	<lastBuildDate>Sat, 06 Mar 2010 00:09:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unique Object Delayed Write w/ Redis</title>
		<link>http://www.colingodsey.com/unique-object-delay-write-cache-w-redis/</link>
		<comments>http://www.colingodsey.com/unique-object-delay-write-cache-w-redis/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 01:37:57 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/?p=211</guid>
		<description><![CDATA[Trying to keep your data updated to a database while undergoing heavy traffic can lead to a very slow response for your queries. Ever wish you could push your writes to a queue so they can be handled during system time and not user time? It&#8217;s pretty easy. This model requires there to be a [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to keep your data updated to a database while undergoing heavy traffic can lead to a very slow response for your queries. Ever wish you could push your writes to a queue so they can be handled during system time and not user time? It&#8217;s pretty easy. This model requires there to be a non-disk key/value data store (Redis, memcache) available that can act as a forward cache. This works better if the system can support lists. If an object does not exist in the forward cache when asked for, it needs to be pulled from the database, assembled and stored in the forward cache. When an object is updated, it needs to be updated in the forward cache as well as being pushed to the write queue. This way your user script only accesses the forward cache and the write cache during standard calls when the cache is already populated with the needed data.</p>
<p>This trick can be enhanced even further by storing a list of unique IDs in the write cache that can be replaced when an objected is updated before one of it&#8217;s previous writes was processed. This means that what would have been two database writes is now one! This requires storing a list in cache as well as the objects, which is done very effectively with <a href="http://code.google.com/p/redis/">Redis</a>.</p>
<p>When used correctly and with a properly designed database that reduces the number of unique objects, <strong>your writes are faster and fewer</strong>! With a few more tricks this system can also be used easily and effectively in a cluster environment. More on that later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/unique-object-delay-write-cache-w-redis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Eclipse and Zend PDT Icons for Ubuntu/Linux</title>
		<link>http://www.colingodsey.com/eclipse-and-zend-pdt-icons-for-ubuntu-and-linux/</link>
		<comments>http://www.colingodsey.com/eclipse-and-zend-pdt-icons-for-ubuntu-and-linux/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 21:52:28 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/?p=108</guid>
		<description><![CDATA[I use Eclipse for all sorts of stuff including Zend PDT, Android SDK and C++. I like to keep my desktop looking well organized and looking professional. I never liked the default Eclipse icon that came with the Linux installs, so I made my own for Eclipse and Zend PDT icons with transparency that look [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.eclipse.org">Eclipse</a> for all sorts of stuff including <a href="http://www.zend.com/community/pdt">Zend PDT</a>, <a href="http://developer.android.com/index.html">Android SDK</a> and C++. I like to keep my desktop looking well organized and looking professional. I never liked the default Eclipse icon that came with the Linux installs, so I made my own for Eclipse and Zend PDT icons with transparency that look snazzy with blending in GNOME panels or <a href="http://awn.wetpaint.com/">Avant Window Manager</a>.</p>
<p style="text-align: center;"><a href="http://www.colingodsey.com/wp-content/uploads/2009/08/zend.png"><img class="size-full wp-image-110  aligncenter" title="zend" src="http://www.colingodsey.com/wp-content/uploads/2009/08/zend.png" alt="zend" width="60" height="60" /></a><a href="http://www.colingodsey.com/wp-content/uploads/2009/08/eclipse.png"><img class="size-full wp-image-109  aligncenter" title="eclipse" src="http://www.colingodsey.com/wp-content/uploads/2009/08/eclipse.png" alt="eclipse" width="48" height="48" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/eclipse-and-zend-pdt-icons-for-ubuntu-and-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SVN For Web Development</title>
		<link>http://www.colingodsey.com/using-svn-for-web-development/</link>
		<comments>http://www.colingodsey.com/using-svn-for-web-development/#comments</comments>
		<pubDate>Thu, 08 May 2008 07:36:25 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/?p=57</guid>
		<description><![CDATA[A while back I ran into a problem settings up a new version control system for our in-house PHP intranet. We have multiple developers working on the intranet at one time, and we needed to maintain independent working environments that we could use to test the overall effects of our code on the entire intranet [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I ran into a problem settings up a new version control system for our in-house PHP intranet. We have multiple developers working on the intranet at one time, and we needed to maintain independent working environments that we could use to test the overall effects of our code on the entire intranet without interfering with others working copies or with our main development repository environment. We wanted all web hosting for the main environment and independent environments to be done on our development server.</p>
<p>After setting up SVN and a repository for the intranet files, I had to figure out a way to set up the web hosting. In order to provide hosting for all individual copies and for the main copy I had to set up network drives for each user. Each individual copy was in a named folder all under one common folder. I used samba to allow users to access their files and set up apache to serve the PHP content out of each folder. Each user then mapped the folder on their workstations and used whichever SVN tool they wanted to check out the files into their new network drive. Their individual copies were now set up and ready to use.</p>
<p>This system is meant to manage the content for our development copy of the intranet only. After files were pushed through SVN they should then appear in the main development checkout. I set up a cron job to pull updated files from SVN and put them into our primary copy of the development intranet. This was our main beta for our changes to be tested and that primary revisions would be pulled from and pushed live.</p>
<p>This was the best solution I could come up with for this problem. To my surprise I didn&#8217;t find anybody else on the Internet with similar problems. This way seems to work just fine for us though and will hopefully help out anybody else looking to manage a project like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/using-svn-for-web-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Use LDAP Over SSL w/ PHP</title>
		<link>http://www.colingodsey.com/how-to-use-ldap-over-ssl-w-php/</link>
		<comments>http://www.colingodsey.com/how-to-use-ldap-over-ssl-w-php/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 05:00:06 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ldap]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/how-to-use-ldap-over-ssl-w-php/</guid>
		<description><![CDATA[LDAP authentication through PHP can be quite handy. With methods such as this, authentication can be done against an LDAP user database. This is convenient if you are writing software that you would like to interface against an established user platform. I ran into this writing software for Northern Illinois University that had an established [...]]]></description>
			<content:encoded><![CDATA[<p>LDAP authentication through PHP can be quite handy. With methods such as this, authentication can be done against an LDAP user database. This is convenient if you are writing software that you would like to interface against an established user platform. I ran into this writing software for Northern Illinois University that had an established staff and student user database with set password management and user information through Novell.</p>
<p>One of the requirements was the connection had to be through a secure tunnel. So using Apache, PHP, php-ldap module, OpenLDAP and OpenSSL on Fedora Core 5 I was able to do this.</p>
<p>The system started with the Apache, PHP and the php-ldap module installed. A custom configure of OpenLDAP had to be done. I <a href="http://www.openldap.org/">downloaded the newest version</a> from the site and configured and installed it with <em>&#8211;with-tls &#8211;enable-slapd. </em> After installing OpenLDAP, I had to add the line <em>TLS_REQCERT never</em> to the end of <em>/etc/openldap/ldap.conf</em>. This option may be needed if you are having certificate troubles.</p>
<p>The following are the two functions i used in PHP to actually do the authentication.</p>
<blockquote><p>function ia_ldap_search($ds, $user) {<br />
$sr=ldap_search($ds, &#8220;o=NIU&#8221;, &#8220;cn=$user&#8221;);<br />
$info = ldap_get_entries($ds, $sr);</p>
<p>return $info[0];<br />
}</p>
<p>function ldap_auth($user, $pass, $search=false) {<br />
$ds=ldap_connect(_IA_STREAM);</p>
<p>if($search) {<br />
$info=ia_ldap_search($ds, $user);<br />
$user=$info['dn'];<br />
} else $info=$user;</p>
<p>$r=@ldap_bind($ds, $user, $pass);<br />
ldap_close($ds);</p>
<p>return $r ? $info : 0;<br />
}</p></blockquote>
<p>_IA_STREAM is a define I provided previously that is the URI of the LDAPS server (<em>ldaps://host:636</em>). These two functions should provide you with the basics from LDAP authentication over SSL. The ldap_auth function takes the username and password and returns the user info if validated, or 0 for failed. Username search can be done by providing the username and settings <em>$search</em> to true when calling the function.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/how-to-use-ldap-over-ssl-w-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Change Default Wordpress Thumbnail Size</title>
		<link>http://www.colingodsey.com/how-to-change-default-wordpress-thumbnail-size/</link>
		<comments>http://www.colingodsey.com/how-to-change-default-wordpress-thumbnail-size/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 16:10:14 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/how-to-change-default-wordpress-thumbnail-size/</guid>
		<description><![CDATA[It&#8217;s nice to be able to change the default thumbnail size for image uploads in Wordpress. I upload tons of big pictures and it&#8217;s nice if the thumbnail just fits within the content width. So here is an easy way to make this change in Wordpress. They have introduced the wp_thumbnail_max_side_length filter that can be [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nice to be able to change the default thumbnail size for image uploads in Wordpress. I upload tons of big pictures and it&#8217;s nice if the thumbnail just fits within the content width. So here is an easy way to make this change in Wordpress. They have introduced the <em>wp_thumbnail_max_side_length</em> filter that can be used to change the default size in plugings and so forth, but this is far easier.</p>
<p>Navigate to your <em>wp-admin</em> folder in your Wordpress installation. Edit <em>admin-functions.php</em> and head to line <em>2228</em>.  You should find this line:</p>
<p><code>$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );</code></p>
<p>The default max size is <em>128</em>px. You can choose what you want for this now. This size determines the maximum size of any side of the image. For my template though, I only care about width. I always want the thumbnail to be as wide as the template. To make that change, go to line <em>2276</em> of the <em>admin-functions.php</em> file. Change the following line:</p>
<p><code>if ( $image_attr[0] &gt; $image_attr[1] ) {</code></p>
<p>To:</p>
<p><code>//if ( $image_attr[0] &gt; $image_attr[1] ) {<br />
if (1) {</code></p>
<p>That&#8217;s it! Now Wordpress will always scale the thumbnail according to the width. Save your changes and try em out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/how-to-change-default-wordpress-thumbnail-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook API &#8211; FQL For Friends With App</title>
		<link>http://www.colingodsey.com/facebook-api-fql-for-friends-with-app/</link>
		<comments>http://www.colingodsey.com/facebook-api-fql-for-friends-with-app/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 18:12:56 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/facebook-api-fql-for-friends-with-app/</guid>
		<description><![CDATA[The Facebook API gives you the option of using FQL (Facebook Query Language) to retrieve data instead of using the built in API calls. I thought this was unnecessary until I needed a quick query to get me the list of a users friends with the current application added. After some research, I came across [...]]]></description>
			<content:encoded><![CDATA[<p>The Facebook API gives you the option of using FQL (Facebook Query Language) to retrieve data instead of using the built in API calls. I thought this was unnecessary until I needed a quick query to get me the list of a users friends with the current application added. After some research, I came across the following query:</p>
<p><code>$facebook-&gt;api_client-&gt;fql_query("SELECT uid FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1 = $user)");</code></p>
<p>This returns a nice quick list I can use in the multi-friend selector for excluded IDs in the &#8217;share&#8217; part of the application as well as a quick number for how many friends have already added the application. This can be very useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/facebook-api-fql-for-friends-with-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QuoteShare Facebook Application</title>
		<link>http://www.colingodsey.com/quoteshare-facebook-application/</link>
		<comments>http://www.colingodsey.com/quoteshare-facebook-application/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 19:53:41 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/quoteshare-facebook-application/</guid>
		<description><![CDATA[QuoteShare is my new PHP Facebook application. I will be journaling several of my difficulties with this app up here on my blog. Facebook apps seem to always give me the weirdest problems available, and those are always good to share with others.
The app so far is very simple: it is scheduled to pull quotes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://apps.facebook.com/quoteshare" target="_blank">QuoteShare</a> is my new PHP Facebook application. I will be journaling several of my difficulties with this app up here on my blog. Facebook apps seem to always give me the weirdest problems available, and those are always good to share with others.</p>
<p>The app so far is very simple: it is scheduled to pull quotes from you and your friends&#8217; profiles and to break them up and place just single quotes randomly on your profile in the QuoteShare box. Check out the screen shot below.</p>
<p><img src="http://www.colingodsey.com/wp-content/uploads/2007/11/qs.png" alt="QuoteShare" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/quoteshare-facebook-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pro MySQL by Michael Kruckenberg, Jay Pipes</title>
		<link>http://www.colingodsey.com/pro-mysql-by-michael-kruckenberg-jay-pipes/</link>
		<comments>http://www.colingodsey.com/pro-mysql-by-michael-kruckenberg-jay-pipes/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 18:08:33 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/pro-mysql-by-michael-kruckenberg-jay-pipes/</guid>
		<description><![CDATA[ Pro MySQL is the first book that exclusively covers intermediate and advanced features of MySQL, the world&#8217;s most popular open source database server. Whether you are a seasoned MySQL user looking to take your skills to the next level, or you&#8217;re a database expert searching for a fast-paced introduction to MySQL&#8217;s advanced features, this [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p> Pro MySQL is the first book that exclusively covers intermediate and advanced features of MySQL, the world&#8217;s most popular open source database server. Whether you are a seasoned MySQL user looking to take your skills to the next level, or you&#8217;re a database expert searching for a fast-paced introduction to MySQL&#8217;s advanced features, this book is for you.</p></blockquote>
<p>This book is amazing for anybody that is interested in advanced database architecture and management. I&#8217;ve started the deep dive into this book and I&#8217;ve felt inspired by the knowledge brought onto me. Every aspect of MySQL is explained in agonizing detail with performance and design aspects thoroughly explored and explained. If you feel that you may be able to achieve better results through MySQL, then this book is for you. The book contains many references to source and gives you the full rundown on the databasing engines. Perfect for figuring out that ideal configuration for your databasing needs.<br />
<img src="http://www.colingodsey.com/wp-content/uploads/2007/11/pro_mysql.gif" alt="Pro MySQL by Michael Kruckenberg, Jay Pipes" /></p>
<p><a href="www.amazon.com/MySQL-Experts-Voice-Open-Source/dp/159059505X" target="_blank">Buy at Amazon.com </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/pro-mysql-by-michael-kruckenberg-jay-pipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy thumbnail mod for phpLD</title>
		<link>http://www.colingodsey.com/easy-thumbnail-mod-for-phpld/</link>
		<comments>http://www.colingodsey.com/easy-thumbnail-mod-for-phpld/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 17:50:17 +0000</pubDate>
		<dc:creator>Colin Godsey</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpld]]></category>

		<guid isPermaLink="false">http://www.colingodsey.com/easy-thumbnail-mod-for-phpld-using-artviper-api/</guid>
		<description><![CDATA[This mod is pretty easy. All it requires is a template change to add in the image location for the thumbnail API and a new cell in the table. Open up your link.tpl file for the phpLD theme you are using. Near the top of the template, right after the table and first row are [...]]]></description>
			<content:encoded><![CDATA[<p>This mod is pretty easy. All it requires is a template change to add in the image location for the thumbnail API and a new cell in the table. Open up your <strong>link.tpl</strong> file for the phpLD theme you are using. Near the top of the template, right after the table and first row are opened (&lt;table&gt;&lt;tr&gt;) add the following:</p>
<p><code>&lt;td style="height: 90px; width: 120px"&gt;<br />
&lt;img src="http://www.artviper.net/screenshots/screener.php?url={$link.URL|escape|trim}"<br />
alt="Thumbnail" /&gt;<br />
&lt;/td&gt;<br />
</code></p>
<p>That should be it! The thumbnails take a bit to be cached, but after they&#8217;re loaded once they should load quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colingodsey.com/easy-thumbnail-mod-for-phpld/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
