<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Challenge In Building a CMS: Different Hosting Setups</title>
	<atom:link href="http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/</link>
	<description>SEO Expert and Philosophical Sci-Fi Author</description>
	<lastBuildDate>Wed, 08 Feb 2012 02:51:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: abdul hafeez</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-197876</link>
		<dc:creator>abdul hafeez</dc:creator>
		<pubDate>Fri, 03 Feb 2012 11:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-197876</guid>
		<description>Thanks for giving new dimensions in php</description>
		<content:encoded><![CDATA[<p>Thanks for giving new dimensions in php</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Md.Zahirul Hoque</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-144938</link>
		<dc:creator>Md.Zahirul Hoque</dc:creator>
		<pubDate>Mon, 28 Nov 2011 11:31:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-144938</guid>
		<description>I am liking your cms alot. is there a way to add my website?</description>
		<content:encoded><![CDATA[<p>I am liking your cms alot. is there a way to add my website?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Md.Zahirul Hoque</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-144937</link>
		<dc:creator>Md.Zahirul Hoque</dc:creator>
		<pubDate>Mon, 28 Nov 2011 11:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-144937</guid>
		<description>I am liking your cms alot. is there a way to add a blog feature?</description>
		<content:encoded><![CDATA[<p>I am liking your cms alot. is there a way to add a blog feature?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gatery</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-45178</link>
		<dc:creator>gatery</dc:creator>
		<pubDate>Fri, 26 Nov 2010 02:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-45178</guid>
		<description>Well good going.! Great stuff.!</description>
		<content:encoded><![CDATA[<p>Well good going.! Great stuff.!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omer</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-44309</link>
		<dc:creator>Omer</dc:creator>
		<pubDate>Wed, 03 Nov 2010 14:35:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-44309</guid>
		<description>I will definitely try this in my next website.</description>
		<content:encoded><![CDATA[<p>I will definitely try this in my next website.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-41669</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 27 Jul 2010 06:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-41669</guid>
		<description>Really I want to appreciate your post, we can easily take idea from your  code,  you have done good work to describe code .  I will also try for my cms base website .</description>
		<content:encoded><![CDATA[<p>Really I want to appreciate your post, we can easily take idea from your  code,  you have done good work to describe code .  I will also try for my cms base website .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gloria</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-40007</link>
		<dc:creator>Gloria</dc:creator>
		<pubDate>Thu, 27 May 2010 07:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-40007</guid>
		<description>i like cms  but  i can use so good  but i will learn more so that  i can have good like others.</description>
		<content:encoded><![CDATA[<p>i like cms  but  i can use so good  but i will learn more so that  i can have good like others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mp3 dinle</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39589</link>
		<dc:creator>mp3 dinle</dc:creator>
		<pubDate>Mon, 26 Apr 2010 22:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39589</guid>
		<description>Well good going.! Great stuff.!</description>
		<content:encoded><![CDATA[<p>Well good going.! Great stuff.!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A. Bear</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39480</link>
		<dc:creator>A. Bear</dc:creator>
		<pubDate>Thu, 08 Apr 2010 15:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39480</guid>
		<description>Hello,

You are very correct that the differences in hosting providers can cause a major headache! In my personal experience, I prefer to lay down some requirements for the software that I consider to be reasonable. For example, I require everything I write to require PHP 5. if someone wants to install something that required PHP5, then it isn&#039;t hard to find an appropriate host. 

That way, there&#039;s no need to maintain compatibility with both systems.  Trying to maintain compatibility with PHP4 and PHP5 at the same time will require a extra maintenance and a lot of library functions. Avoid it if you can! It will make your life a lot easier.

What I DO try to do, however, is not use features that have been introduced in recent PHP versions (5.2, 5.3) and stick with what has been around for a while (5.0, 5.1). Hosting providers are awful about keeping things up to date...

Speaking of error handling - if you are developing software for both PHP4 and PHP5, then you may want to consider looking at how PEAR (pear.php.net) handles errors. In PHP4, Exceptions did not exist, so most things dealt with errors the same way you do in C; return 0, -1, false, or some other basic value to denote an error condition.

What PEAR does instead is return an error object, with a message, error code, stack trace, all kinds of good things from calls that fail. So, to check for an error condition from a PEAR library, you would call: 

&lt;code&gt;if (PEAR::isError($result = $object-&gt;someMethod())) {
   echo &quot;Something broke!&quot;;
}&lt;/code&gt;

This was a godsend back in the days of PHP4 and worked very, very well. It provided some of the benefits of exceptions (good data about an error) in an environment that didn&#039;t support them. If course, the code ends up having a lot of PEAR::isError blocks, but being able to handle and capture errors this way is a big benefit over checking for false.

One pitfall that I see very often is string manipulation NOT being multibyte safe. For example, substr can break a Unicode string since it works on bytes, not characters. The mb_ functions are what should be used, but I have found that not all providers have it installed. One great solution that I found was this utf8 library that uses the native mb_ functions if they exist, but if thy do not, uses a pure PHP implementation for the same effect: http://sourceforge.net/projects/phputf8/

Something that you may find useful (I find it to be VERY useful) is the auto_prepend feature. Every page needs access to standard libraries and configuration values, and using auto_prepend means you don&#039;t have to add it to the top of every page.

Combine this with __autoload and you have a great way to avoid a mess of require statements on every page. This only works, however, if your hosting provider allows you to use a custom php.ini or set values in an .htaccess file.

Hope this helps - if not you, then someone else who stumbles along. PHP is a great language, but much like Perl it gives you a lot of rope. You can tie fancy knots or end up hanging yourself!</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>You are very correct that the differences in hosting providers can cause a major headache! In my personal experience, I prefer to lay down some requirements for the software that I consider to be reasonable. For example, I require everything I write to require PHP 5. if someone wants to install something that required PHP5, then it isn&#8217;t hard to find an appropriate host. </p>
<p>That way, there&#8217;s no need to maintain compatibility with both systems.  Trying to maintain compatibility with PHP4 and PHP5 at the same time will require a extra maintenance and a lot of library functions. Avoid it if you can! It will make your life a lot easier.</p>
<p>What I DO try to do, however, is not use features that have been introduced in recent PHP versions (5.2, 5.3) and stick with what has been around for a while (5.0, 5.1). Hosting providers are awful about keeping things up to date&#8230;</p>
<p>Speaking of error handling &#8211; if you are developing software for both PHP4 and PHP5, then you may want to consider looking at how PEAR (pear.php.net) handles errors. In PHP4, Exceptions did not exist, so most things dealt with errors the same way you do in C; return 0, -1, false, or some other basic value to denote an error condition.</p>
<p>What PEAR does instead is return an error object, with a message, error code, stack trace, all kinds of good things from calls that fail. So, to check for an error condition from a PEAR library, you would call: </p>
<p><code>if (PEAR::isError($result = $object-&gt;someMethod())) {<br />
   echo "Something broke!";<br />
}</code></p>
<p>This was a godsend back in the days of PHP4 and worked very, very well. It provided some of the benefits of exceptions (good data about an error) in an environment that didn&#8217;t support them. If course, the code ends up having a lot of PEAR::isError blocks, but being able to handle and capture errors this way is a big benefit over checking for false.</p>
<p>One pitfall that I see very often is string manipulation NOT being multibyte safe. For example, substr can break a Unicode string since it works on bytes, not characters. The mb_ functions are what should be used, but I have found that not all providers have it installed. One great solution that I found was this utf8 library that uses the native mb_ functions if they exist, but if thy do not, uses a pure PHP implementation for the same effect: <a href="http://sourceforge.net/projects/phputf8/" rel="nofollow">http://sourceforge.net/projects/phputf8/</a></p>
<p>Something that you may find useful (I find it to be VERY useful) is the auto_prepend feature. Every page needs access to standard libraries and configuration values, and using auto_prepend means you don&#8217;t have to add it to the top of every page.</p>
<p>Combine this with __autoload and you have a great way to avoid a mess of require statements on every page. This only works, however, if your hosting provider allows you to use a custom php.ini or set values in an .htaccess file.</p>
<p>Hope this helps &#8211; if not you, then someone else who stumbles along. PHP is a great language, but much like Perl it gives you a lot of rope. You can tie fancy knots or end up hanging yourself!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Westergren</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39219</link>
		<dc:creator>Jim Westergren</dc:creator>
		<pubDate>Mon, 01 Feb 2010 15:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39219</guid>
		<description>Thank you Keith.</description>
		<content:encoded><![CDATA[<p>Thank you Keith.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Davis</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39214</link>
		<dc:creator>Keith Davis</dc:creator>
		<pubDate>Sat, 30 Jan 2010 09:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39214</guid>
		<description>Hi Jim
Sorry that I can&#039;t add any technical help or comments, I&#039;m OK with html and CSS but PHP is not my strong point.
I do however appreciate all the potential problems of different PHP versions etc.
What I&#039;d like to do is thank you for putting in your own time to produce this CMS.
Plus - I can hopefully provide you with some encouragement.

Keep up the good work...</description>
		<content:encoded><![CDATA[<p>Hi Jim<br />
Sorry that I can&#8217;t add any technical help or comments, I&#8217;m OK with html and CSS but PHP is not my strong point.<br />
I do however appreciate all the potential problems of different PHP versions etc.<br />
What I&#8217;d like to do is thank you for putting in your own time to produce this CMS.<br />
Plus &#8211; I can hopefully provide you with some encouragement.</p>
<p>Keep up the good work&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron B</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39150</link>
		<dc:creator>Aaron B</dc:creator>
		<pubDate>Fri, 15 Jan 2010 23:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39150</guid>
		<description>Thanks. I can do that easily.</description>
		<content:encoded><![CDATA[<p>Thanks. I can do that easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Westergren</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39146</link>
		<dc:creator>Jim Westergren</dc:creator>
		<pubDate>Thu, 14 Jan 2010 09:38:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39146</guid>
		<description>Hi Aaron,

No, not at the moment. Check out Wordpress for a good blog you could get for free. And then you could either install that in a sub directory or link to it from your page.</description>
		<content:encoded><![CDATA[<p>Hi Aaron,</p>
<p>No, not at the moment. Check out WordPress for a good blog you could get for free. And then you could either install that in a sub directory or link to it from your page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron B</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39144</link>
		<dc:creator>Aaron B</dc:creator>
		<pubDate>Wed, 13 Jan 2010 22:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39144</guid>
		<description>I am liking your cms alot. is there a way to add a blog feature?</description>
		<content:encoded><![CDATA[<p>I am liking your cms alot. is there a way to add a blog feature?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shubham</title>
		<link>http://www.jimwestergren.com/challenge-in-building-a-cms-different-hosting-setups/#comment-39082</link>
		<dc:creator>Shubham</dc:creator>
		<pubDate>Tue, 29 Dec 2009 11:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jimwestergren.com/?p=266#comment-39082</guid>
		<description>Well good going.! Great stuff.!</description>
		<content:encoded><![CDATA[<p>Well good going.! Great stuff.!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

