<?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>The Slow Lane &#187; PHP</title>
	<atom:link href="http://www.paulgarvin.net/blog/posts/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.paulgarvin.net/blog</link>
	<description>A blog about autocrossing, some geeky stuff &#38; Philadelphia.</description>
	<lastBuildDate>Mon, 29 Mar 2010 17:14:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Performance of static vs. instanciated method calls</title>
		<link>http://www.paulgarvin.net/blog/posts/92</link>
		<comments>http://www.paulgarvin.net/blog/posts/92#comments</comments>
		<pubDate>Fri, 14 Aug 2009 20:03:41 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.paulgarvin.net/blog/?p=92</guid>
		<description><![CDATA[As you saw in my past post I am working on filtering user input into my PHP application. I don&#8217;t want to get to much into the boring details because I started to write the post explaining all the little details and I could see it getting very long and drawn out and unfocused. But [...]]]></description>
			<content:encoded><![CDATA[<p>As you saw in my past post I am working on filtering user input into my PHP application. I don&#8217;t want to get to much into the boring details because I started to write the post explaining all the little details and I could see it getting very long and drawn out and unfocused. But I was experimenting with calling the filter functions as static methods of a class. Then I thought about making objects of the class and calling the method from the instantiated class. I wanted to know if there was a performance difference between the two so I created a test. And there is.</p>
<p>For the test I am using my Filter_UTF8 class, discussed a little in my last blog post. I am calling the validate method. This is not a &#8220;hello world&#8221; type of test. The method does some heavy lifting and/or calculating. For all the tests I would call the method 10,000 times, to validate a ~1,200 kB text file. The same file would be validated over and over again.</p>
<p>The first test was to use call_user_func_array to call the method. This took 10 to 11 seconds to run.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$iteration</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10000</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$iteration</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$ret</span> <span style="color: #339933;">=</span> <span style="color: #990000;">call_user_func_array</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Filter_UTF8'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'validate'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
        <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4096</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Next was Creating object, calling the method, and then destroying the object. I did it this way because this simulates one of the common design pattern for doing filters, a collection object holds a bunch of filter instances for each value of the form. Then when &#8220;validation&#8221; is run each one is called to do it&#8217;s thing and then the form is processed and they are all destroyed once the form data is saved or it&#8217;s re-rendered. So each instance is created, run once, or twice if maybe you have a getMessage() type function, and they destroyed. I feel test is close to how the above design pattern would work on a large scale.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$iteration</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10000</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$iteration</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$my</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Filter_UTF8<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$ret</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4096</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
    <span style="color: #000088;">$my</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The results were surprising. It took 33 seconds for this to run. Eeek!</p>
<p>I thought maybe the act of creating and destroying all those objects was causing the slowdown. So I created a third test that created one instance and calls the validate() method 10,000 times.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$iteration</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10000</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Filter_UTF8<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$iteration</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$ret</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4096</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>I was really surprised when this took the same 33 seconds as creating 10,000 instances did. The crappy thing is, creating a bunch of instances is easier than trying to manage calling them statically unless you want to type out each filter call in a bunch of if/else statements (I&#8217;m trying to do an automated form type of thing). I just can&#8217;t believe the performance difference. You wouldn&#8217;t notice the difference on each page hit, where you had 100 of these. But if your script had 100 people all doing the same thing at once that ends up being a big difference.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulgarvin.net/blog/posts/92/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTF-8 Validation and PHP, do you?</title>
		<link>http://www.paulgarvin.net/blog/posts/84</link>
		<comments>http://www.paulgarvin.net/blog/posts/84#comments</comments>
		<pubDate>Thu, 13 Aug 2009 03:47:51 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.paulgarvin.net/blog/?p=84</guid>
		<description><![CDATA[I wonder why none of the major PHP frameworks have validators for UTF-8 encoding? You may be asking why do I need to validate incoming text as UTF-8? UTF-8 is the preferred character encoding for the web, if you want to display languages other than the Latin derived ones. All of the browsers support it. [...]]]></description>
			<content:encoded><![CDATA[<p>I wonder why none of the major PHP frameworks have validators for UTF-8 encoding? You may be asking why do I need to validate incoming text as UTF-8? UTF-8 is the preferred character encoding for the web, if you want to display languages other than the Latin derived ones. All of the browsers support it. And so do all the major databases. I won&#8217;t get into the basics about <a href="http://en.wikipedia.org/wiki/Utf-8">what UTF-8 is</a> and <a href="http://www.joelonsoftware.com/articles/Unicode.html">why you should use it</a>. There are plenty of other resources for that. I&#8217;m also going to assume you are sending the correct <em>charset</em> header (in HTTP, not relying on a <em>meta</em> tag). And that your DB tables and connections are declared to use UTF-8. That stuff <a href="http://www.varslashlog.com/2009/02/09/how-to-use-unicodeutf-8-in-php-properly-part-1/comment-page-1/">is</a> <a href="http://htmlpurifier.org/docs/enduser-utf8.html">well</a> <a href="http://developer.loftdigital.com/blog/php-utf-8-cheatsheet">covered</a> <a href="http://www.phpwact.org/php/i18n/utf-8">elsewhere</a> <a href="http://akrabat.com/2009/03/18/utf8-php-and-mysql/">also</a>.</p>
<p>I still haven&#8217;t really told you why you would want to validate incoming text as UTF-8, I&#8217;ve only told you why you should use it. And the simple answer is the old security mantras of <strong>all input is evil</strong> and <strong>Filter Input and Escape Output</strong>. If this text is input I want to be validating it, no? The <a href="http://www.w3.org/International/questions/qa-forms-utf-8">W3C recommends</a> that you validate UTF-8 text. <a href="http://www.phpwact.org/php/i18n/charsets#checking_utf-8_for_well_formedness">WACT does too</a>. It&#8217;s <a href="http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string">been proven</a> that you can launch an XSS attack on a site using &#8220;incorrectly&#8221; encoded text. Chris&#8217; example used GBK encoding, but I think you can do the same thing with UTF-8. Is it immune?</p>
<p>I&#8217;ve been looking at a lot of example code looking for answers. The &#8220;major&#8221; PHP frameworks I looked at were <a href="http://framework.zend.com/">Zend Framework</a>, <a href="http://cakephp.org/">CakePHP</a>, <a href="http://www.symfony-project.org/">Symfony</a>, <a href="http://www.solarphp.com/">Solar</a>, <a href="http://codeigniter.com/">Codeigniter</a>, and <a href="http://www.kohanaphp.com/">Kohana</a>. None of them include any validators for UTF-8, or any other text encoding. I looked at some other smaller frameworks but they were lucky to have validators at all.</p>
<p>I also looked at a few of the big mainstream PHP projects. <a href="http://www.joomla.org/">Joomla</a>, <a href="http://www.mediawiki.org/">MediaWiki</a>, <a href="http://www.phpbb.com/">phpBB</a>, and <a href="http://wordpress.org/">Wordpress</a>. Of them Joomla contains the library PHP UTF-8 by <a href="http://www.sitepoint.com/articlelist/210/">Harry Fuecks</a>. The purpose of this library is to provide &#8220;native&#8221; PHP multibyte string functions when <em>mb_string</em> isn&#8217;t loaded on your server (and presumably you can&#8217;t do anything about it because you are on shared hosting). In the back of this library is a couple of functions, one actually validates UTF-8 and returns a true or false. The second converts UTF-8 to it&#8217;s Unicode code points, returned as an array. And the last converts that array back to UTF-8. The last two are used in the library&#8217;s <em>uft8_strtolower()</em> and <em>uft8_strtoupper()</em> functions, but is other wise unused by Joomla. The first function, called <em>utf8_is_valid()</em> is the one I am most interested in, and it is not used at all. Interestingly Kohana includes this same library, but they rearranged the files and function names, and stripped out the <em>utf8_is_valid()</em function all together.</p>
<p>MediaWiki and phpBB both use a set of functions to <a href="http://en.wikipedia.org/wiki/Unicode_normalization">Normalize</a> UTF-8 data strings. This goes beyond just validating the byte stream. It is also recommended to Normalize UTF-8 so it sorts properly and consistently, and that is probably why these two packages do it. Both, especially MediaWiki count on being able to search strings well. But it also seems to be compute intensive. For what it&#8217;s worth it appears phpBB borrowed MediaWiki&#8217;s code and refactored it.</p>
<p>The last of our quadruple, Wordpress, contains a function to do a basic validation if a stream is UTF-8. However it seems that in practice this seems to be more UTF-8 detection than it is validation. The function, called <em>seems_utf8()</em>, allows 5 and 6 byte sequences, which were apparently in the early UTF-8 versions, before the Unicode consortium decided to limit the code point range to U+10FFFF, making anything over 4 bytes unnecessary. It also does not check for the disallowed UTF-16 surrogate code points, or byte order marks. Those last two points are important because Windows, Java, and Oracle store text internally in UTF-16. So a botched conversion from one of these sources into the browser could send invalid text to your PHP application. I don&#8217;t know the ins and outs of copy and pasting from one of these sources to a browser. I assume a conversion happens but don&#8217;t know where.</p>
<p>Getting back to the utf8_is_valid() function in PHP UTF-8, this is essentially what I have in mind for my CMS. The code in that function comes from another <a href="http://hsivonen.iki.fi/php-utf8/">small library</a> written by <a href="http://hsivonen.iki.fi/">Henri Sivonen</a> of <a href="http://validator.nu/">validator.nu</a> fame. He provides a function to convert a UFT-8 string to Unicode code points, returned in an array, and another one to convert the array to a UTF-8 string. Sound familiar? This is where the PHP UTF-8 library got it&#8217;s code that does the same thing. I stumbled onto this library through the WACT site, and ended up coding essentially the same thing Harry Fuecks did. I also made a &#8220;sanitizer&#8221; version that &#8220;deconstructs&#8221; the byte stream and throws out all the bad byte sequences without the intermediate point of the array. It just concatenates the good byte sequences int a new string.</p>
<p>I haven&#8217;t gotten into the functions PHP natively provides for checking and converting character encodings. But this post is long enough so that will have to wait until another day. So for anyone in the PHP community lucky or unlucky enough to read this post, should we be validating strings to make sure they are in the encoding we think they are in?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulgarvin.net/blog/posts/84/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An idea and a setback</title>
		<link>http://www.paulgarvin.net/blog/posts/80</link>
		<comments>http://www.paulgarvin.net/blog/posts/80#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:51:44 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.paulgarvin.net/blog/?p=80</guid>
		<description><![CDATA[I&#8217;ve had an idea. I&#8217;ve been having lots of ideas lately but this one has been in my head for a while. There are lots of Content Management Systems or CMS&#8217; out there, software that you use to build and maintain a website. They come in all shapes, sizes, and complexities. I have observed there [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had an idea. I&#8217;ve been having lots of ideas lately but this one has been in my head for a while. There are lots of <a href="http://en.wikipedia.org/wiki/Content_management_system">Content Management Systems</a> or CMS&#8217; out there, software that you use to build and maintain a website. They come in all shapes, sizes, and complexities. I have observed there is a missing niche among all of these CMS&#8217;. Something that is simple to use for non-computer people, and offer the basics without going overboard with complexity or features. This <a href="http://wordpress.org/">Wordpress</a> blog I&#8217;m typing on now is a good example. In fact Wordpress has become very popular as a CMS for small websites where you just need to make a few pages.</p>
<p>That is where my inspiration came from. Our <a href="http://www.phillyscca.com/">SCCA webpage</a> could use a CMS like that. And a friend of mine runs a <a href="http://www.valleycreekproductions.com/">videography business</a> where he wants to be able to update his site frequently. You could just use Wordpress for these sites, but why drag along all the blog oriented code when you aren&#8217;t going to use it. Plus I believe Wordpress could use a good tune-up. It is still written for the <a href="http://www.php.net/archive/2007.php#2007-07-13-1">no-longer-supported PHP4</a>.</p>
<p>So I started writing my own little CMS in my spare time. It&#8217;s very slow going. It&#8217;s hard to get something really going when you are doing it two hours at a time. and of course I&#8217;ve been running into some snags and doing a lot of learning. One of those snags turned out to be database access. I saw that I would be writing a bunch of similar queries. So I wrote a lightweight database abstraction layer to automate some of that SQL creation. This database layer is based on PHP5&#8217;s <a href="http://www.php.net/manual/en/book.pdo.php">PDO</a>, meaning it has an object oriented interface and I can use it to connect to many different databases, assuming the SQL I write is compatible.</p>
<p>I don&#8217;t want to re-invent the wheel so I looked at two frameworks that do something similar, <a href="http://framework.zend.com/manual/en/zend.db.html">Zend_Db</a> and <a href="http://www.solarphp.com/class/Solar_Sql">Solar_Sql</a> for ideas. They both take a different approach on how to handle prepared statements and how to pass the data into them. I tried to take the middle road and support both. The solution which I came up with, I recently found out won&#8217;t work. So I&#8217;ve got to give it a big re-think. It&#8217;s thing like this that are slowing the project down. Plus the stop-starting from lack of time. I didn&#8217;t want to talk too much about this project until it was more together. but based on this &#8220;little&#8221; setback I realized that it&#8217;s going to take a lot longer then I hoped for this thing to see the light of day. So I might as well talk about it online. I certainly haven&#8217;t been autocrossing this summer. <img src='http://www.paulgarvin.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulgarvin.net/blog/posts/80/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back on the Horse</title>
		<link>http://www.paulgarvin.net/blog/posts/67</link>
		<comments>http://www.paulgarvin.net/blog/posts/67#comments</comments>
		<pubDate>Fri, 19 Jun 2009 15:20:47 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Autocross]]></category>
		<category><![CDATA[Miata]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Prelude]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.paulgarvin.net/blog/?p=67</guid>
		<description><![CDATA[September. Damn that seems like a long time ago, because well it was. And a lot has happened since then. For one I&#8217;m married now. There is not much to blog about atucrossing over the winter b/c there really isn&#8217;t much autocrossing over the winter. Philly region does have a winter series but I didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>September. Damn that seems like a long time ago, because well it was. And a lot has happened since then. For one I&#8217;m married now. There is not much to blog about atucrossing over the winter b/c there really isn&#8217;t much autocrossing over the winter. Philly region does have a winter series but I didn&#8217;t attend it b/c my Miata got rear-ended and subseqently totaled out by the insurance co. That was obviously a big bummer b/c I was looking forward to really tuning the car this year and bridging the gap to the CRXs.</p>
<p>And Irene and I decided to get rid of the Prelude. It was just getting two high in mileage. So that is two cars gone over the winter. We did get something cool to replace the Prelude though, a Mazdaspeed3. We both like th car a lot. S-plan pricing really made it a good deal.</p>
<p>Initially I was going to find another Miata shell this spring and swap everything over. But I decided to put that on hold till next year so we can focus on finding a house. The government is holding this $8,000 tax credit carrot in front of our noses and we&#8217;d be stupid to not try and take advantage of it. So there hasn&#8217;t been much to report on the car front. I have done a few autocrosses in the Mazdaspeed3. But I&#8217;ve also missed a bunch.</p>
<p>So because of all that stuff, and there was some crappy medical stuff going one over the winter, that I haven&#8217;t been posting. I&#8217;ve realized of late that there is a lot of other stuff I could be posting about other than cars and autocrossing. I don&#8217;t like putting to much personal life stuff up on a public blog. But I have been getting more interested in what is happening in politics, or more like what the current President and congress are doing to &#8220;fix the economy&#8221;. For the record I don&#8217;t like it, which is why I feel I should be writing about it. In addition there is the real possibility of &#8220;carbon cap &#038; trade&#8221; coming to this country now. I have some strong opinions on that since I work in the utility industry. Specifically I don&#8217;t like it.</p>
<p>I have also been messing around with computers more lately. I got really fed up with Vista and tried Linux again. There is at least one future blog post in that story. I have also been messing around with trying to write a small CMS for websites. It is going very slowly since I can only dedicate an hour or two each day to it. IT is very rewarding though and I could see myself doing that for a living if I was to find a way to change careers w/o a drop in pay (yeah right!). And I have been doing more unique stuff with the 3D design software we use in work, Autodesk Inventor. There are some potential blog posts waiting to come out of that experience.</p>
<p>So now that I&#8217;ve made the excuse post and gotten back on the horse let&#8217;s hope I can me more active on this thing again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulgarvin.net/blog/posts/67/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new Philly SCCA Forum is live!</title>
		<link>http://www.paulgarvin.net/blog/posts/36</link>
		<comments>http://www.paulgarvin.net/blog/posts/36#comments</comments>
		<pubDate>Mon, 10 Mar 2008 04:12:27 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[phpBB]]></category>

		<guid isPermaLink="false">http://www.paulgarvin.net/blog/posts/36</guid>
		<description><![CDATA[Last weekend I rolled out an upgrade to phpBB3 for my local SCCA region&#8217;s discussion forum. That includes a theme customized to match our region color of yellow. I have added on several extra features to extend the functionality of the software. One of which is a Topic Preview that show you an excerpt of [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend I rolled out an upgrade to phpBB3 for my local SCCA region&#8217;s discussion forum. That includes a theme customized to match our region color of yellow. I have added on several extra features to extend the functionality of the software. One of which is a Topic Preview that show you an excerpt of the first post when you hover over the link to said post. I am now actually the developer/maintainer of that MOD. I could and should write a few blog posts dedicated to that subject. I place of blog posts you can read about it in <a href="http://www.paulgarvin.net/forum/viewtopic.php?f=4&#038;t=41">my discussion forum</a>.</p>
<p>The conversion went well. We convinced our host to move us to a server with PHP 5 and MySQL 5 prior to the conversion. The old version of MySQL that was used didn&#8217;t have UTF-8 support and the developers had to do a bunch of kludging to get UTF-8 support. Although we really don&#8217;t need the UTF-8 stuff that is the way the software is written so everything should be on the same page. And unless you&#8217;ve been living in a cave PHP 4 will be de-supported in August. So I wanted to start this version of the forum off right instead of having to convert a kludged database. That meant creating a new database. I wasn&#8217;t sure if I could do that though. I was under the impression I had to do the upgrade in the old database. The documentation or info in the support forums didn&#8217;t help me find the answer I was looking for.</p>
<p>Well after starting the install based on doing it in the old database I figured out that you could make a new DB and still transfer everything over. So I killed what I was doing and started over with a fresh MySQL 5.0 DB using MySQLi drivers. <img src='http://www.paulgarvin.net/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  The overall reaction has been positive. There was of course some growing pains just because it was new. I found a problem with my Topic Preview MOD in that it has a flicker in IE (I knew about that) but also in IE sometimes the preview box covers the topic link so you can&#8217;t click on it. That I didn&#8217;t know about, but I realized I should be doing more cross browsing testing. I have done a lot of searching for a solution to this problem but can&#8217;t find anyone with the exact same issue. I finally recently found someone with a similar situation who figured out the issue happens when text has to be wrapped in the preview box. I consider this a bug in IE because Firefox handles it just fine.</p>
<p>I also found an issue with posted images. There is a section of the Admin interface that allows you to set a max width for images. I thought that the board would use CSS to resize images to a the max size. But what it does is check the dimensions of the image and prevents you from posting if they are larger that the max. That is inconvenient at the least and with so many computer illiterate people on our forums unacceptable. I pretty much have a solution mapped out that involves assigning a class to all images in posts. But after modifying the phpbb template file that deals with bbcode the changes aren&#8217;t showing up. And phpBB.com hasn&#8217;t been any help so far. I&#8217;ll be posting up in <a href="http://www.paulgarvin.net/forum/viewforum.php?f=4">my discussion forum</a> once I gt it figured out. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulgarvin.net/blog/posts/36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Geek Updates</title>
		<link>http://www.paulgarvin.net/blog/posts/34</link>
		<comments>http://www.paulgarvin.net/blog/posts/34#comments</comments>
		<pubDate>Tue, 05 Feb 2008 04:48:41 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[phpBB]]></category>

		<guid isPermaLink="false">http://www.paulgarvin.net/blog/?p=34</guid>
		<description><![CDATA[I&#8217;ve been busy lately with some geeky projects. Well one is kinda autocross related. :-p My SCCA Region runs a discussion forum as part of the website. Since I have some coding knowledge I volunteered to help put with the website and got put in charge of that. We use phpBB software. It&#8217;s free, its [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been busy lately with some geeky projects. Well one is kinda autocross related. :-p <a href="http://www.phillyscca.com">My SCCA Region</a> runs a <a href="http://www.phillyscca.com/forum/">discussion forum</a> as part of the website. Since I have some coding knowledge I volunteered to help put with the website and got put in charge of that. We use <a href="http://www.phpbb.com">phpBB</a> software. It&#8217;s free, its stable, pretty popular, and with lots of user submitted extensions (Mods) and styles. And they have recently released version 3 of their software. It is a total re-write of the code with numerous enhancements both for the users and admins. We want to roll this out but first I wanted to make skin for the new software using our region colors. Our current skin is the default one that comes with the board. The new default skin has too much bright blue for me. And I wanted something a little different. I hope to roll that out soon. Using our &#8220;region color&#8221; was tough because it is yellow. Yes, yellow. It is really hard to work with. Really hard. But I am close to something usable that everyone can agree on.</p>
<p>I&#8217;ve also installed some mods to extend the functionality a bit. And I have modded the code a bit myself, as well as helping to get the Topic Preview mod working. I&#8217;ll be posting up these mods in the <a href="http://www.paulgarvin.net/forum/">discussion forum on this site</a>, which is run on&#8230; you guessed it, phpBB3, soon. Then I will be posting them in the <a href="http://www.phpbb.com/community/viewforum.php?f=70">Mod Development forum</a> on phpBB.com. IN addition to that I&#8217;ve been woking on some updates to this website. I need to create a new portal or front page for paulgarvin.net. I can&#8217;t decide if I want to have a dedicated portal or just use this blog for the front page. Hhhmmm. AND&#8230; I&#8217;ve been working on something I wanted to do for a while, put weather info on the website. I&#8217;m re-writing an older Wordpress plugin that I found. More about that in another post. Oh the off-season. And of course there is the wedding stuff which you can read about over on our <a href="http://www.paulgarvin.net/wedding/">wedding blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulgarvin.net/blog/posts/34/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
