<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    <title>mysiteonline™ - PHP</title>
    <link>http://life.mysiteonline.org/</link>
    <description>Brendon Kozlowski's Home on the Web.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1.2 - http://www.s9y.org/</generator>
    <pubDate>Wed, 16 Jul 2008 19:37:36 GMT</pubDate>

    <image>
        <url>http://life.mysiteonline.org/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: mysiteonline™ - PHP - Brendon Kozlowski's Home on the Web.</title>
        <link>http://life.mysiteonline.org/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>I18n and L10n in PHP</title>
    <link>http://life.mysiteonline.org/archives/142-I18n-and-L10n-in-PHP.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/142-I18n-and-L10n-in-PHP.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=142</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=142</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    There was recently a nice posting from PHPDeveloper.org linking to an article by Florian Eibeck, where on his blog he discusses some solutions to these extremely fun situations.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.thinkphp.de/archives/342-Multilingual-Websites-with-PHP.html&quot;&gt;http://blog.thinkphp.de/archives/342-Multilingual-Websites-with-PHP.html&lt;/a&gt; 
    </content:encoded>

    <pubDate>Tue, 15 Jul 2008 13:29:06 -0400</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/142-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>CakePHP Auth Component</title>
    <link>http://life.mysiteonline.org/archives/140-CakePHP-Auth-Component.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/140-CakePHP-Auth-Component.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=140</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=140</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Disclaimer: These are primarily notes for myself as I get accustomed to CakePHP&#039;s (v1.2) authentication and ACL.  I&#039;ve been building a website and wanted to finally make use of CakePHP before I start using it for the library&#039;s CMS.  A CMS is a large undertaking and I don&#039;t want to go into it &quot;cold-turkey&quot;, so I came up with some side-project to help me understand the framework a bit better.  All in all, it truly is an &lt;em&gt;extremely&lt;/em&gt; rapid development tool.&lt;br /&gt;
&lt;br /&gt;
I decided not to go with ExpressionEngine or Drupal simply because I&#039;d still have to take time to learn those systems and make modules or extensions within those languages - and there&#039;s no guarantee I&#039;d be able to do what I&#039;d need to do with them.  If I build it myself, it would take just about the same amount of time with Cake.  Anyway, to continue... &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/140-CakePHP-Auth-Component.html#extended&quot;&gt;Continue reading &quot;CakePHP Auth Component&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 09 May 2008 11:21:02 -0400</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/140-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Extending the Wordpress Visual Editor</title>
    <link>http://life.mysiteonline.org/archives/96-Extending-the-Wordpress-Visual-Editor.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/96-Extending-the-Wordpress-Visual-Editor.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=96</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=96</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Although I personally detest Wordpress, it does have its uses and the user-interface is well-constructed, making it much easier for non-technical users to use it.  Regardless, when it doesn&#039;t do &lt;em&gt;quite&lt;/em&gt; what you want it to do, extending it can sometimes be really easy (due to the massive number of plugins), or extremely difficult.  Most of the time, in my case (recently), it&#039;s the latter and not the former.&lt;br /&gt;
&lt;br /&gt;
I was recently given the task to import an unmodified XML dataset into a web-based tool as tabular data, HTML&#039;ified, and allow for visual editing of the information, and they wanted to use Wordpress.  I thought, &quot;Okay, that should be easy enough.&quot;  Well, okay, do I create a plugin to handle the import?  I don&#039;t really want to learn Wordpress hooks and programming functionality considering I hate the thing...no, I&#039;ll just import it directly into the database.  I used a diff tool to discover that creating a new draft entry only modifies three database tables anyway, that&#039;s easy enough.  Got that working, 1-2-3, lickity-split!&lt;br /&gt;
&lt;br /&gt;
But now, we need to let staff have access to modify the tabular data. &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/96-Extending-the-Wordpress-Visual-Editor.html#extended&quot;&gt;Continue reading &quot;Extending the Wordpress Visual Editor&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 15 Jun 2007 17:06:49 -0400</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/96-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>php|tek</title>
    <link>http://life.mysiteonline.org/archives/87-phptek.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/87-phptek.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=87</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=87</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    I sent in a support ticket to php|arch a short while ago inquiring about something related to my purchases, and was expecting someone from sales to get back to me, instead it seems that anything regarding the specific question I had is sent to the person in charge of the training, unnecessarily so in my opinion, but still...  Regardless, I got an email back from the trainer, Paul Reinheimer (aka, the really cool PHP guy), telling me how he&#039;s currently at php|tek, apologized for the slow response (due to the &lt;a href=&quot;http://hades.phparch.com/ceres/public/tek/&quot;&gt;php|tek&lt;/a&gt; conference, sponsored by php|architect, and php|arch being pretty low on in-office staffers)...he also said I should be there.&lt;br /&gt;
&lt;br /&gt;
I somewhat agree, even if I did have presentations and meetings of my own to attend which were pretty important.  Alas, I&#039;m now jealous.  There are always blogs buzzing over how great the conference was by other PHP developers once it&#039;s over.  Dancing, eating, prizes, drinking, socializing, networking, brainstorming, and all around geekiness (save the best for last).  The trials and tribulations of being &quot;broke&quot; and just starting out in a professional career.  Oh well, I do what I love, and love what I do, so I&#039;m still rich.  I can at least read about all the cool stuff going on!  &lt;img src=&quot;http://life.mysiteonline.org/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Fri, 18 May 2007 20:28:25 -0400</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/87-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>I had 5 minutes, and CakePHP.</title>
    <link>http://life.mysiteonline.org/archives/72-I-had-5-minutes,-and-CakePHP..html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/72-I-had-5-minutes,-and-CakePHP..html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=72</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=72</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    I had five minutes to do something before I decided that I wanted to watch a movie...I&#039;m now putting that off simply to report back on what I got out of my time.&lt;br /&gt;
&lt;br /&gt;
For the background information...I just discovered that the person traditionally in charge of handling my high school&#039;s class reunions, is out of the country and could probably care less over handling everything...so we need something up quick and dirty. &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/72-I-had-5-minutes,-and-CakePHP..html#extended&quot;&gt;Continue reading &quot;I had 5 minutes, and CakePHP.&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 01 Apr 2007 20:40:46 -0400</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/72-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Reflections with GD in PHP</title>
    <link>http://life.mysiteonline.org/archives/65-Reflections-with-GD-in-PHP.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/65-Reflections-with-GD-in-PHP.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=65</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=65</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    There are a ton of image libraries out there that do similar things, but if you simply need something to &lt;em&gt;only&lt;/em&gt; do image reflections with a small amount of extra features, Richard Davey&#039;s &lt;a href=&quot;http://reflection.corephp.co.uk/&quot;&gt;Easy Reflections&lt;/a&gt; fits the bill!  If you think you might need it, or simply want to read over other portions of &lt;a href=&quot;http://www.corephp.co.uk&quot;&gt;his blog&lt;/a&gt;, take a gander!  He may not post often, but when he does, the content is usually an interesting read.&lt;br /&gt;
&lt;br /&gt;
Update: I had the wrong URL to Richard&#039;s tool.  I&#039;ve just fixed that.  (Thanks for pointing that out, Richard!) 
    </content:encoded>

    <pubDate>Thu, 15 Mar 2007 10:17:14 -0400</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/65-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Unidentified PHP Bug</title>
    <link>http://life.mysiteonline.org/archives/62-Unidentified-PHP-Bug.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/62-Unidentified-PHP-Bug.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=62</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Bug is known to be small, hides in corners and although is present everywhere, only makes itself known in odd circumstances.  It flitters about in the air just above you where you don&#039;t expect it during those circumstances.  At other times, it snuggles up in a corner, but is always present, waiting for the right opportunity.  Considered to be armed and dangerous, as well as mischievous.&lt;br /&gt;
&lt;br /&gt;
For the past year or so, I&#039;ve been either trying to figure out what&#039;s wrong with a script I wrote, or whether or not I should rewrite it from scratch, or if possible, how to save the thing with odd workarounds.  I thought, &quot;there&#039;s got to be something wrong with my code&quot;.  Every day after looking at it for hour after hour, not able to figure out what the cause of the problem was, I would think, &quot;There&#039;s got to be some sort of bug in PHP!!!&quot;...but when I&#039;d think that, I&#039;d try to do a search to find any other people who&#039;ve had similar circumstances.&lt;br /&gt;
&lt;br /&gt;
Well, poor coding practice (non-cached dynamic image) alongside some tricky $_SESSION management (and requirements) caused for some odd behavior.  Session data was getting dropped on certain pages for no good reason.  It worked fine up until a certain page and/or point.  I&#039;m not entirely sure what the error is caused by, but I do know that removing the dynamically created image stops the error and the session information continues to behave as would and should be expected.  If anyone&#039;s interested in tackling the identification of this bug, I&#039;d absolutely &lt;em&gt;&lt;strong&gt;love&lt;/strong&gt;&lt;/em&gt; some help, expert or otherwise.  Unfortunately, as of right now, I&#039;d have to share full code disclosure as I can&#039;t identify any smaller problem code than the full application with those certain settings turned on or off (as I &lt;em&gt;just&lt;/em&gt; found the error); so I&#039;ve really no idea what combination of code is required to recreate this error.  I also do not have any debugging software strong enough to show what the stack trace/dump would look like during execution of the problem page.&lt;br /&gt;
&lt;br /&gt;
...but man...  1+ year of being annoyed by this thing.  For a &lt;strong&gt;long&lt;/strong&gt; time, I thought it was the server configuration.  I was damned sure of it.  My test-bed development machine never rendered the dynamic image.  &lt;img src=&quot;http://life.mysiteonline.org/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Mon, 26 Feb 2007 21:56:11 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/62-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>CakePHP Manual</title>
    <link>http://life.mysiteonline.org/archives/55-CakePHP-Manual.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/55-CakePHP-Manual.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=55</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=55</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    So I started reading the CakePHP manual (after cheating and going through the example blog creation code, which is part of the manual).  I&#039;m learning it&#039;s much more powerful than I had originally thought.  Like I said, I &lt;em&gt;started&lt;/em&gt; reading the manual...then I realized just how long it was.&lt;br /&gt;
&lt;br /&gt;
I&#039;m now printing it out.  It&#039;s used up about 1/3 of a ream of paper...and this printer has a duplexer, so it&#039;s printing on the front and back of the pages.  The only complaint I have is that originally, the manual had chapter numbers, now the chapter sections use names only...unfortunately, the manual references chapters and chapter sections by the numerical association in some places.  I&#039;d also like a single PDF version of the whole thing (and that&#039;s saying a lot considering my hatred for PDFs).  Otherwise, the manual&#039;s written very well, and in an informal writing style.  Very easy to read.  Even though it says you won&#039;t need a knowledge of MVC - not having a short background education in it might get you pretty confused.&lt;br /&gt;
&lt;br /&gt;
Either way, it&#039;s my suggested reading for those of you looking for a framework.  If you don&#039;t decide on CakePHP, it might help you understand how the other frameworks (could possibly) work. 
    </content:encoded>

    <pubDate>Sat, 03 Feb 2007 14:08:22 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/55-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Best PHP Framework?</title>
    <link>http://life.mysiteonline.org/archives/54-Best-PHP-Framework.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/54-Best-PHP-Framework.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=54</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    While I&#039;m waiting for my database export/import to finish here at work, I figure I&#039;d write about something I was thinking about late last night.&lt;br /&gt;
&lt;br /&gt;
I constantly find myself rewriting old code with slight &lt;em&gt;logic&lt;/em&gt; variations and taking too much time in doing so.  I keep thinking, &quot;If I make my functions general enough for all-purpose use, this won&#039;t happen,&quot; and yet it still does.  I know I need to adopt (or create) a framework for my PHP development if I want to be decently productive.  I&#039;ve been waiting for the Zend Framework to reach the v1.0 milestone, but... &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/54-Best-PHP-Framework.html#extended&quot;&gt;Continue reading &quot;Best PHP Framework?&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 01 Feb 2007 15:30:20 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/54-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>An XHTML Strict, PHP Hello World from Scratch in Under 60 Seconds with Intype</title>
    <link>http://life.mysiteonline.org/archives/48-An-XHTML-Strict,-PHP-Hello-World-from-Scratch-in-Under-60-Seconds-with-Intype.html</link>
            <category>PHP</category>
            <category>Programming</category>
            <category>Software</category>
            <category>Web Development</category>
    
    <comments>http://life.mysiteonline.org/archives/48-An-XHTML-Strict,-PHP-Hello-World-from-Scratch-in-Under-60-Seconds-with-Intype.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=48</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Since others were having fun with it, I decided to show off a quick, poorly chosen framerate flash demonstration of Intype creating an XHTML/PHP file to do the all-famous Hello World script.  Obviously, the point is not to demonstrate my coding knowledge (or mis-knowledge), but to show off the text editor&#039;s snippet control features, and how it can speed up development.  In case you&#039;re curious how it interacts, for the first step I typed out the text &lt;strong&gt;xml&lt;/strong&gt; and then pressed the TAB key, everything was automatically filled in for the XML header.  I then typed in &lt;strong&gt;doctype&lt;/strong&gt; and then TAB, but since there are multiple doctypes, it gave me a choice of which one I wanted to use, so I used the arrow keys to highlight the desired choice and pressed the ENTER key.  To move through the parameter list within each snippet (fillable properties), you would also use the TAB key and enter whatever it is you want, or press the DELETE or BACKSPACE (I think) key to remove the entire property.&lt;br /&gt;
&lt;br /&gt;
Please note the system clock window to know how long this actually took me -- you can clock it, heck you can even clock my hesitation since I&#039;m not used to the tool yet. &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/48-An-XHTML-Strict,-PHP-Hello-World-from-Scratch-in-Under-60-Seconds-with-Intype.html#extended&quot;&gt;Continue reading &quot;An XHTML Strict, PHP Hello World from Scratch in Under 60 Seconds with Intype&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 07 Jan 2007 22:09:08 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/48-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Windows version of TextMate: Intype</title>
    <link>http://life.mysiteonline.org/archives/47-Windows-version-of-TextMate-Intype.html</link>
            <category>PHP</category>
            <category>Programming</category>
            <category>Software</category>
            <category>Web Development</category>
    
    <comments>http://life.mysiteonline.org/archives/47-Windows-version-of-TextMate-Intype.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=47</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=47</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    The very first alpha &lt;em&gt;public&lt;/em&gt; version of Intype has been released for testing.  The developers are looking for feedback on this release - but do keep in mind it is the very first release.  If you&#039;ve ever used an editor or IDE in Windows, you will probably wonder what&#039;s so special about something like this...there seem to be no features! &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/47-Windows-version-of-TextMate-Intype.html#extended&quot;&gt;Continue reading &quot;Windows version of TextMate: Intype&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 06 Jan 2007 17:36:26 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/47-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>PHP v5.2.0 Gotcha</title>
    <link>http://life.mysiteonline.org/archives/36-PHP-v5.2.0-Gotcha.html</link>
            <category>PHP</category>
            <category>Programming</category>
    
    <comments>http://life.mysiteonline.org/archives/36-PHP-v5.2.0-Gotcha.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=36</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=36</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    I&#039;m in the process of creating a server install setup process for our Macintosh OSX G5 Server and originally had PHP v5.1.6 in the install steps.  I had tested it with the live site data and all worked fine.  Because PHP v5.2.0 is supposed to have speed and efficiency increases, as well as a hook to allow for the ability to keep track of upload progress (i.e.: visually follow an upload with a moving graph using PHP and JavaScript without any other odd language bridges or hacks), I figured I might as well just switch the versions in the documentation.&lt;br /&gt;
&lt;br /&gt;
Well, I just tried it out today and finalized all of the virtualhost parameters and re-uploaded the live data.  What nice thing do I see on the screen to greet me?  ....nothing, it&#039;s a production server so errors are not displayed.  Unfortunately for me I forgot to assign an error log file location...oops.  Apache&#039;s error log was not definitive enough.  Time to upgrade my local test machine&#039;s version of PHP as well.&lt;br /&gt;
&lt;br /&gt;
WARNING: Redeclaration of &amp;lt;insert_func-name_here&amp;gt;() in ...&lt;br /&gt;
&lt;br /&gt;
Okay, ummm...how is it being redeclared?  It worked fine on v5.1.6...&lt;br /&gt;
&lt;br /&gt;
With a little more research, I found the problem to be that MY FUNCTION NAME IS NOW A RESERVED WORD -- AN INTERNAL FUNCTION NAME.  There&#039;s a new function category called &lt;a href=&quot;http://www.php.net/filter&quot;&gt;Filter&lt;/a&gt; that also includes the aptly named function &quot;filter_input()&quot;.  Yeah, I can&#039;t imagine ANYONE who&#039;s ever written procedural code to have a function like that in there...  So anyway, be warned.  I had to add a prefix to my function and then edit any and all instances of it within my code.&lt;br /&gt;
&lt;br /&gt;
...just yet another reason for me as to why to move completely over to OOP and forget about procedural PHP programming. 
    </content:encoded>

    <pubDate>Mon, 27 Nov 2006 22:06:23 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/36-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Undiscovered Dates</title>
    <link>http://life.mysiteonline.org/archives/35-Undiscovered-Dates.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/35-Undiscovered-Dates.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=35</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Okay, technically if something&#039;s &quot;undiscovered&quot;, no one knows about it...and it&#039;s impossible for something in a programming language to be undiscovered because for it to exist, someone has to know about it...in fact, a lot of someones have to know about it.  Regardless...&lt;br /&gt;
&lt;br /&gt;
I was recently &lt;a href=&quot;http://www.antisen.se/entry/6&quot;&gt;reading&lt;/a&gt; about how difficult it was for someone to create a DATE field in an Atom feed (they were creating a home-brew blog/cms with Python).  Well, accidentally while researching what the php.ini file directives (found in PHP 5.2.0+, but available since 5.0.0 according to Zend) for the date.sunset_zenith and date.sunrise_zenith were for.  I still didn&#039;t entirely figure it out, but I can still set the latitude and longitude correctly.  However, while looking for this information, I found that PHP apparently has CONST values for many abstract date formats...all thanks to &lt;a href=&quot;http://www.w3schools.com/php/php_ref_date.asp&quot;&gt;W3Schools&lt;/a&gt;!&lt;br /&gt;
&lt;br /&gt;
Constants: ATOM, DATE_COOKIE, DATE_ISO8601, DATE_RFC821, DATE_RFC850, DATE_RFC1036, DATE_RFC1123, DATE_RFC2822, DATE_RSS, and DATE_W3C&lt;br /&gt;
&lt;br /&gt;
Now, it is very true that PHP&#039;s date functions are extremely thorough and easy to use, as well as to convert to/from.  However, if you have constant values, why the heck not use them?! 
    </content:encoded>

    <pubDate>Mon, 27 Nov 2006 21:56:15 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/35-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Zend Framework v0.20</title>
    <link>http://life.mysiteonline.org/archives/34-Zend-Framework-v0.20.html</link>
            <category>PHP</category>
            <category>Programming</category>
            <category>Web Development</category>
    
    <comments>http://life.mysiteonline.org/archives/34-Zend-Framework-v0.20.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=34</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    I haven&#039;t kept up with the Zend Framework as much as I would have liked to.  The buzz has died down, and it seems that it also caused me to lose focus on it.  Since I&#039;ve been somewhat bored lately (although I like being bored, gives my imagination more time to itself) and have had time to even play some console games (my poor, poor neglected XBox system), I figure I&#039;ll give it another go.&lt;br /&gt;
&lt;br /&gt;
What got me started with the Zend Framework (not the idea, but the actual code) was Rob Allen&#039;s personal blog by way of Zend&#039;s DevZone.  Cal, reporter for DevZone, talked about a Framework tutorial that was written up by Rob Allen, and so I took a look.  It wasn&#039;t some ugly looking blog post, it was a fully downloadable PDF.  I just HAD to have myself a copy!  I downloaded it, realized there were typos and errors, but for the most part, it was a HUGE introduction into how the Zend Framework actually worked.  After fixing (overcoming) some bugs and completing the tutorial, I actually had a non-secure but fully functioning bootstrapped Zend-Framework-powered website section.  I was happy.  I was ecstatic, actually.  I also had other projects waiting for me to complete.  I don&#039;t even remember if I finished them or not...&lt;br /&gt;
&lt;br /&gt;
Either way, the Zend Framework has updated its public stable release with a new version and Rob has updated his tutorial.  I&#039;m going through it right now and checking for errors that are still present (found 2 or 3 already) and will report back to him on them to help him out with that.  If you want to get started using the Zend Framework and like viewing code to understand it (and playing with it) without a HUGE or whole lot of explanation as to what every little thing does (he does break it down, but not a whole lot, you would need some understanding of MVC architecture and PHP to understand this), then I &lt;strong&gt;strongly&lt;/strong&gt; urge you to check out this tutorial.&lt;br /&gt;
&lt;br /&gt;
Source: &lt;a href=&quot;http://www.akrabat.com/zend-framework-tutorial/&quot; title=&quot;Zend Framework Tutorial&quot;&gt;http://www.akrabat.com/zend-framework-tutorial/&lt;/a&gt; &lt;br /&gt;&lt;a href=&quot;http://life.mysiteonline.org/archives/34-Zend-Framework-v0.20.html#extended&quot;&gt;Continue reading &quot;Zend Framework v0.20&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 26 Nov 2006 20:17:06 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/34-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Serendipity Event Plugin nl2br FIXED</title>
    <link>http://life.mysiteonline.org/archives/26-Serendipity-Event-Plugin-nl2br-FIXED.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/26-Serendipity-Event-Plugin-nl2br-FIXED.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=26</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Okay, &quot;FIXED&quot; is a bit of an over-statement; the plugin did exactly as it was supposed to, it called PHP&#039;s &lt;strong&gt;&lt;a href=&quot;http://www.php.net/nl2br/&quot;&gt;nl2br()&lt;/a&gt;&lt;/strong&gt; function on all input prior to output.  Unfortunately, that&#039;s not always the desired result, so I&#039;ve made it &quot;smarter&quot;, not exactly &quot;fixed&quot; it...&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?t=436501&quot;&gt;With help&lt;/a&gt; from some members on the SitePoint forums, I&#039;ve modified the serendipity_event_plugin_nl2br to work with HTML &lt;strong&gt;textarea&lt;/strong&gt;, &lt;strong&gt;pre&lt;/strong&gt;, and the BBCode &lt;strong&gt;GeSHi&lt;/strong&gt; modifiers so that those ugly &lt;strong&gt;&amp;lt;br /&amp;gt;&lt;/strong&gt; tags aren&#039;t added when they aren&#039;t wanted.&lt;br /&gt;
&lt;br /&gt;
The updates are now live on this site, so I don&#039;t have to go back and update anything.  Cool!&lt;br /&gt;
&lt;br /&gt;
Here&#039;s what I did:&lt;br /&gt;
- Open up &lt;strong&gt;&lt;code&gt;pluginsserendipity_event_nl2brserendipity_event_nl2br.php&lt;/code&gt;&lt;/strong&gt; in your serendipity folder&lt;br /&gt;
- add two new functions (within the class, but order of where they go is unimportant, I placed them before the &lt;strong&gt;event_hook&lt;/strong&gt; function) as shown below:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;php&quot; cols=&quot;70&quot; rows=&quot;10&quot;&gt;    function isolate($src, $regexp = NULL)
    {
        if($regexp) return preg_replace_callback($regexp, array($this, &#039;isolate&#039;), $src);
        global $_buf;
        $_buf[] = $src[0];
        return &quot;\001&quot; . (count($_buf) - 1);
    }

    function restore($text)
    {
        global $_buf;
        return preg_replace(&#039;~\001(\d+)~e&#039;, &#039;$_buf[$1]&#039;, $text);
    }&lt;/textarea&gt;&lt;br /&gt;
- find the following line in the event_hook function: &lt;strong&gt;&lt;code&gt;$eventData[$element] = nl2br($eventData[$element]);&lt;/code&gt;&lt;/strong&gt; and replace it with the following:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;php&quot; cols=&quot;70&quot; rows=&quot;10&quot;&gt;$eventData[$element] = $this-&gt;isolate($eventData[$element], &#039;~[&lt;\[\](textarea|pre|geshi).*?[&gt;\]].*?[&lt;\[\]\/1[&gt;\]]~si&#039;);
$eventData[$element] = nl2br($eventData[$element]);
$eventData[$element] = $this-&gt;restore($eventData[$element]);&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
That should be it.  (YAY, I can finally post code snippets now!)  I eventually plan on updating this a bit more to allow for user submitted tags to be ignored by the nl2br function within this event.  Any help on that would be appreciated since I don&#039;t entirely understand the plugin system, even after speed-reading through the example documentation.  &lt;img src=&quot;http://life.mysiteonline.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Sun, 12 Nov 2006 17:59:21 -0500</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/26-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>

</channel>
</rss>