<?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>ChiaoCheng.com &#187; PHP</title>
	<atom:link href="http://www.chiaocheng.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chiaocheng.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 04 Jun 2010 23:20:46 +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>Wordpress thumbnail generation disabled</title>
		<link>http://www.chiaocheng.com/2009/06/wordpress-thumbnail-generation-disabled/</link>
		<comments>http://www.chiaocheng.com/2009/06/wordpress-thumbnail-generation-disabled/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 23:22:29 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.chiaocheng.com/?p=60</guid>
		<description><![CDATA[No thumbnails in your wordpress?  Read on&#8230;
I noticed last night that my wordpress is not generating thumbnails from uploaded images like it&#8217;s suppose to. You&#8217;ll noticed that the size options (thumbnail, medium, large) are all disabled except for the full size.

After doing a lot of searching, I finally found out that in order for [...]]]></description>
			<content:encoded><![CDATA[<p>No thumbnails in your wordpress?  Read on&#8230;</p>
<p>I noticed last night that my wordpress is not generating thumbnails from uploaded images like it&#8217;s suppose to. You&#8217;ll noticed that the size options (thumbnail, medium, large) are all disabled except for the full size.</p>
<p style="text-align: center;"><img class="size-full wp-image-62  aligncenter" title="wordpress-size-options" src="http://www.chiaocheng.com/wp-content/uploads/2009/06/wordpress-size-options.png" alt="wordpress-size-options" width="637" height="114" /></p>
<p>After doing a lot of searching, I finally found out that in order for wordpress to generate thumbnails &#8220;by default&#8221;, you need to have GD library support for your php. It would have been nice if wordpress had documented that better.</p>
<p>The only reference I found was this:</p>
<p><a href="http://wordpress.org/support/topic/235625" target="_blank">http://wordpress.org/support/topic/235625</a></p>
<p>To be clear, <strong>wordpress does not generate thumbnails by default unless your php instance has GD support</strong>.</p>
<h3 id="toc-install-php-gd-library">Install php gd library</h3>
<p>For me, installing GD library was easy:
<pre class="brush:shell; gutter:false">
# yum install php-gd
</pre>
<h3 id="toc-check-for-gd">Check for gd</h3>
<p>To check if you have GD loaded in php:
<pre class="brush:shell; gutter:false; highlight:[11]"># php -m
[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
exif
ftp
gd
gettext
gmp
hash
iconv</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/06/wordpress-thumbnail-generation-disabled/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>this version of PCRE is not compiled with PCRE_UTF8 support</title>
		<link>http://www.chiaocheng.com/2009/06/pcre-utf8-support/</link>
		<comments>http://www.chiaocheng.com/2009/06/pcre-utf8-support/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 01:24:02 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.crikeymate.com/?p=33</guid>
		<description><![CDATA[After installing wordpress, I got a lot of these errors in my apache wordpress error log.
PHP Warning:  preg_match_all() [&#60;a href='function.preg-match-all'&#62;function.preg-match-all&#60;/a&#62;]:
Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in ...
I am running apache 2.2.8 and it uses the built-in version 5 of pcre.
http://httpd.apache.org/docs/2.2/new_features_2_2.html
The problem is that version 5 of [...]]]></description>
			<content:encoded><![CDATA[<p>After installing wordpress, I got a lot of these errors in my apache wordpress error log.</p>
<pre>PHP Warning:  preg_match_all() [&lt;a href='function.preg-match-all'&gt;function.preg-match-all&lt;/a&gt;]:
Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in ...</pre>
<p>I am running apache 2.2.8 and it uses the built-in version 5 of pcre.</p>
<p><a href="http://httpd.apache.org/docs/2.2/new_features_2_2.html" target="_blank">http://httpd.apache.org/docs/2.2/new_features_2_2.html</a></p>
<p>The problem is that version 5 of pcre does not contain UTF-8 support.  So I had to recompile apache with a newer version of pcre. Luckily I have pcre 6.6 already installed on my linux box.</p>
<pre>&gt;&gt; rpm -qa |grep -i pcre
pcre-devel-6.6-2.el5_0.1
pcre-6.6-2.el5_0.1
pcre-6.6-2.el5_0.1</pre>
<p>So all I had to do is re-compile apache with the &#8220;&#8211;with-pcre&#8221; flag.</p>
<pre>./configure --with-pcre</pre>
<p>If you don&#8217;t know what version of pcre your php is using, create a phpinfo script and hit it with your broswer.  You should see&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-34  aligncenter" title="php-pcre" src="http://www.chiaocheng.com/wp-content/uploads/2009/06/php-pcre.png" alt="pcre version" width="622" height="108" /></p>
<p>Happy compiling&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/06/pcre-utf8-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to wordpress 2.8</title>
		<link>http://www.chiaocheng.com/2009/06/moving-to-wordpress-2-8/</link>
		<comments>http://www.chiaocheng.com/2009/06/moving-to-wordpress-2-8/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 20:15:52 +0000</pubDate>
		<dc:creator>chiao</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.crikeymate.com/?p=17</guid>
		<description><![CDATA[I&#8217;ve finally moved chiaocheng.com to wordpress.  I have been looking for ways to add content more easily than writing up html pages.  To achieve that, I focused on two types of software, blogs and wiki&#8217;s.  Initially, I had hoped to keep my site on java for integration purposes.  My photo album is running off tomcat [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally moved <a href="http://www.chiaocheng.com">chiaocheng.com</a> to <a href="http://wordpress.org/" target="_blank">wordpress</a>.  I have been looking for ways to add content more easily than writing up html pages.  To achieve that, I focused on two types of software, blogs and wiki&#8217;s.  Initially, I had hoped to keep my site on java for integration purposes.  My photo album is running off tomcat and so keeping things in java would have allowed me to include my photo album without redirecting to a new site.  I looked at several java solutions such as <a href="http://www.jspwiki.org/" target="_blank">jspwiki</a> and <a href="http://www.jamwiki.org" target="_blank">jamwiki</a> but unfortunately, I didn&#8217;t find anything suitable.  I finally decided to ditch the java requirement.  After that, the choice got a lot easier since wordpress is very popular, thus having a lot of community built support around it.</p>
<p>Another important factor for me was the ability to customize the software.  Not only the legal ability but also the ease to understand and change the underlying software.  Not being a php guy, I&#8217;ve been pleasantly surprised how easy and straight forward to understand and modify the code base.  The bad part is that it looks very much like procedural spagehiti code resembling much of what you would see if a java web app was written completely in jsp.</p>
<p>Just a few weeks ago, wordpress 2.8 came out.  So I installed the new version and it seems like a lot of the buggy admin functions are now fixed.  Using wordpress 2.7, I felt a lot of the backend pages had bugs.  Luckily for me, 2.8 came out at the perfect time.</p>
<p>You can find my old website here: <a href="http://old.chiaocheng.com">old.chiaocheng.com</a>.  It going to take me some time to move everything over.</p>
<p>And guess what, you just read my first ever blog post!</p>
<p>Happy blogging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chiaocheng.com/2009/06/moving-to-wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
