<?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>Lifelog &#187; PHP / MySQL</title>
	<atom:link href="http://www.lifelog.be/category/it/webdesign/php-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lifelog.be</link>
	<description>Life as a web developer/entrepreneur</description>
	<lastBuildDate>Wed, 10 Aug 2011 13:05:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>&#8220;goeie code&#8221; een mythe ?</title>
		<link>http://www.lifelog.be/2010/01/28/goeie-code-een-mythe/</link>
		<comments>http://www.lifelog.be/2010/01/28/goeie-code-een-mythe/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 09:00:49 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[PHP development strategy planning tips]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/?p=145</guid>
		<description><![CDATA[Deze post gaat over een leuk dilemma in het ontwikkelen van projecten, meer bepaald het schrijven van code. Iedereen die al eens geprogrammeerd heeft aan een groter project (neen ik heb het niet over de myspace pagina van jouw neefje&#8217;s reggae band) kent het dilemma &#8220;goeie code&#8221; vs &#8220;snelle code&#8221;. Bij elk groter project komt [...]]]></description>
			<content:encoded><![CDATA[<p>Deze post gaat over een leuk dilemma in het ontwikkelen van projecten, meer bepaald het schrijven van code. Iedereen die al eens geprogrammeerd heeft aan een groter project (neen ik heb het niet over de myspace pagina van jouw neefje&#8217;s reggae band) kent het dilemma &#8220;goeie code&#8221; vs &#8220;snelle code&#8221;. Bij elk groter project komt er een bepaald moment waar je moet kiezen : de snelle (&#038; dirty) oplossing of tijd investeren in de perfecte code ? Er zijn zeer weinig projecten waar de duurzame oplossing, maar vaak komt het hierop neer &#8220;if it works, it works&#8221;, niets is minder waar.</p>
<p>Elke die-hard developer weet dat de wereld beter zou worden van &#8220;goeie code&#8221;. Applicaties (in mijn geval web applicaties) zouden niet alleen doen wat ze horen te doen, ze zouden ook nog eens sneller zijn ! Het project process zou vlotter verlopen, en het eindresultaat zou voldoen aan alle eisen vooropgesteld in de analyse, right ? Spijtig genoeg is de realiteit anders. </p>
<p>Het eindresultaat is niet altijd afhankelijk van tijd/resources, er zijn ook andere factoren.</p>
<p>Ik heb in het verleden al aan tal van internet applicaties gewerkt, en altijd had ik de beste intenties voor de realisatie van het project. Altijd ! Beginnend met de analyse, alle actoren en processen zo goed mogelijk in kaart brengen en begrijpen hoe al die zaken uiteindelijk moeten samenwerken. Het resultaat was (meestal) duidelijke en gedocumenteerde code die gestructureerd, onderhoudbaar, leesbaar en uitbereidbaar was&#8230;tenminste toch tot de klant zich besloot te &#8220;moeien&#8221; <img src='http://www.lifelog.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Indien je al aan grotere projecten gewerkt hebt ken je zeker deze regel : &#8220;klanten weten nooit wat ze willen&#8221;. Zelfs als ze beweren van wel. Na het tonen van de eerste demo zijn ze verbaast en enthousiast zodat ze onmiddelijk idee&#8217;en beginnen te opperen om de applicatie &#8220;nog beter&#8221; en &#8220;nog cooler&#8221; te maken. Nu dit is niet echt een probleem zolang je de klant onder controle hebt (analyse document, project specificaties), maar dit niet het geval is : &#8220;let the bad code in&#8221; ! <img src='http://www.lifelog.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Op 90% van de reeds gerealiseerde projecten kwam er een moment waarop we keuzes moesten maken. Mogelijk kan er uit de eerste demo maar één voorstel van functionaliteit komen wat de klant geintegreerd wil zien. De kans is groot dat net deze functionaliteit zal botsen met alles wat je daarvoor al hebt geschreven. Daarom is het extreem moeilijk om &#8220;goeie code&#8221; te behouden. Het vereist oefening, ervaring en skill om dingen te schrijven die flexibel genoeg zijn om te voorzien aan de toenemende eisen van de klant.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2010/01/28/goeie-code-een-mythe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working on existing PHP applications</title>
		<link>http://www.lifelog.be/2007/01/10/working-on-existing-php-applications/</link>
		<comments>http://www.lifelog.be/2007/01/10/working-on-existing-php-applications/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 14:53:43 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2007/working-on-existing-php-applications/</guid>
		<description><![CDATA[We&#8217;ve all been there before, you&#8217;ve been hired to finish / work on someone elses work, and you encounter some very strange behaviour. If you&#8217;re working on a small website, going through the code should provide you with the necessairy information to solve this issue, however, if the application is somewhat bigger (multiple components, databases, [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve all been there before, you&#8217;ve been hired to finish / work on someone elses work, and you encounter some very strange behaviour. If you&#8217;re working on a small website, going through the code should provide you with the necessairy information to solve this issue, however, if the application is somewhat bigger (multiple components, databases, caching, dynamic code building, multiple objects &#8230;) it&#8217;s always nice to know exactly what code is being executed on a certain moment.</p>
<p>Imagine you have found the exact page / function / action where it&#8217;s going wrong, and you are trying to debug it. Commercial companies offer solutions like Zend Platform / Zend Studio to debug, view stacktraces, variable watches &#038; alot more&#8230;and i am mostly using Zend Studio for that too, but at this moment in time, <a href="http://www.zend.com/forums/index.php?t=msg&#038;th=2661&#038;start=0">Zend does not offer a windows library for Zend Platform that supports PHP 5.2.0</a>, <a title="Building Inspectation Data...**yawn**" target="_blank" href="http://www.zend.com/forums/index.php?t=msg&#038;th=2538&#038;start=0">neither did they release a fix for Zend Studio 5.5 to build inspectation data over a Samba share</a>&#8230;So let&#8217;s do the same thing using <a title="PHP Debugger / Profiler" target="_blank" href="http://www.xdebug.org/">XDebug</a>, afterall the world still spins without Zend.<br />
Make sure to get the right windows or linux module for your php version from <a title="Xdebug, PHP Profiler &#038; Debugger" target="_blank" href="http://www.xdebug.org/">www.xdebug.org</a> and use the <a title="Howto install Xdebug" target="_blank" href="http://www.xdebug.org/install.php">installation instructions</a> to get it running, make sure to check phpinfo to see if the xdebug is loaded. When everything is installed, we&#8217;ll start by profiling a certain action to find out what exactly the page/action is doing. Make sure to adapt your php.ini with the following configuration :</p>
<blockquote><p>zend_extension_ts=&#8221;c:/apache/php/ext/php_xdebug-2.0.0rc2-5.2.1.dll&#8221;</p>
<p>[xdebug]<br />
xdebug.remote_autostart=1<br />
xdebug.remote_enable=1<br />
xdebug.remote_handler=dbgp<br />
xdebug.remote_mode=req<br />
xdebug.profiler_append=0<br />
xdebug.profiler_enable=1<br />
xdebug.profiler_enable_trigger=1<br />
xdebug.profiler_output_dir=c:/temp/<br />
xdebug.profiler_output_name=profile</p></blockquote>
<p>After that restart your apache, and open the page you want to analyse. As soon as you send a request to the webserver it will create a file in the c:/temp (or whatever path you defined). For me it generated a file (c:/temp/cachegrind.out.5808). This file contains alot of information what exactly php was doing on your request. Call it a stack trace. This file is human readable but does not give an immidiate overview, that&#8217;s why i would suggest <a target="_blank" title="WinCachegrind" href="http://sourceforge.net/projects/wincachegrind/">to use a program to analyse the cachegrind</a>. To my knowledge, the best program to-do that is <a target="_blank" title="KCacheGrind" href="http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/KcacheGrindDownload">KCacheGrind</a>, the downside is that is a KDE program, so if you are using windows you would need alot of hacks, just to get KCacheGrind running, thats why there is a windows port (with less features) available called <a target="_blank" href="http://sourceforge.net/projects/wincachegrind/">WinCacheGrind</a>. If you open WinCache use the File>Open File dialog and relocate to the cachegrind.out file (for me c:/temp/cachegrind.out.5808), depending on the size of your file, wincachegrind will start analysing and give you a visual representation of the stack trace of your action.</p>
<p>Note that all pages you visit from now (untill de-activating the module in php.ini) will get &#8216;profiled&#8217; and generate a cachegrind file. As this is filesystem intensive, i would suggest commenting the above php.ini section as soon as you&#8217;re done and restart your webserver.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2007/01/10/working-on-existing-php-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Propel / Pager / Datagrid &#8211; Part II</title>
		<link>http://www.lifelog.be/2007/01/09/propel-pager-datagrid-part-ii/</link>
		<comments>http://www.lifelog.be/2007/01/09/propel-pager-datagrid-part-ii/#comments</comments>
		<pubDate>Tue, 09 Jan 2007 12:56:23 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[datagrid]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2007/propel-pager-datagrid-part-ii/</guid>
		<description><![CDATA[In my previous post, i talked about the writing of a custom datagrid for propel usage. The required features for this datagrid would be : easy configuration multi sortable columns (ascending &#038; descending) search features add actions to one or multiple records (icon + action) sizeable columns go to page x ability to change rows [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post, <a title="Propel Datagrid - Part I" target="_blank" href="http://www.lifelog.be/2006/propel-pager-datagrid/">i talked about the writing of a custom datagrid for propel usage.</a> The required features for this datagrid would be :</p>
<ul>
<li>easy configuration</li>
<li>multi sortable columns (ascending &#038; descending)</li>
<li>search features</li>
<li>add actions to one or multiple records (icon + action)</li>
<li>sizeable columns</li>
<li>go to page x</li>
<li>ability to change rows per page</li>
</ul>
<p>So since my last post, 2 weeks have passed and i am proud to say we&#8217;ve finished a large part of the code. Now we are still having problems with the javascript to allow the user to change his column width in multiple browsers, IE seems to refuse some of the javascript code. I am still looking into that.</p>
<p>P.S. : I have been getting several e-mails with code requests. Untill i am really done i won&#8217;t give out the code. If you think you can help me with the javascript resizing issue though, you can always drop me an e-mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2007/01/09/propel-pager-datagrid-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Propel / Pager / Datagrid</title>
		<link>http://www.lifelog.be/2006/12/15/propel-pager-datagrid/</link>
		<comments>http://www.lifelog.be/2006/12/15/propel-pager-datagrid/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 13:27:56 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[DAL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[datagrid]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[propel]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2006/propel-pager-datagrid/</guid>
		<description><![CDATA[Because we are using propel in most of our larger projects, it&#8217;s very common we need a datagrid for the listing of the objects. A year ago we made a datagrid with the most important features combined with an ajax approach (sorting, filtering&#8230;), for the ajax functionality we wrote our own javascript function calls, what [...]]]></description>
			<content:encoded><![CDATA[<p>Because we are using propel in most of our larger projects, it&#8217;s very common we need a datagrid for the listing of the objects. A year ago we made a datagrid with the most important features combined with an ajax approach (sorting, filtering&#8230;), for the ajax functionality we wrote our own javascript function calls, what led to alot of unmanageable code, both javascript and php.</p>
<p>As time moved on, this loading of the datagrid became slower and slower (due to increasing objects, about 9000 records with multiple joined tables). This was mainly because the old datagrid first loaded all objects, and then sorted the entire array by the columns as defined by the user&#8230;.don&#8217;t tell me..i know ! This is a bad approach, that means all records get looped, and if you are using propel that would mean for each of those 9000+ records an object is created&#8230;that&#8217;s crazy&#8230;(it has some advantages though)&#8230;</p>
<p>So now i finally found some time to do a total rewrite of this datagrid, combined with the power of the <a title="Propel Pager" target="_blank" href="http://propel.phpdb.org/docs/api/current/runtime/propel.util/PropelPager.html">propel pager</a>, <a title="Propel Criteria" target="_blank" href="http://propel.phpdb.org/docs/user_guide/chapters/FindingObjects.html">propel criteria</a> &#038; the php/ajax framework <a title="Xajax" target="_blank" href="http://www.xajaxproject.org/">xajax</a>, i came up, faster then expected, with a powerfull scalable datagrid that only loads the visible records. All switchpages, sorting &#038; filters call a corresponding ajax function. These functions change the criteria in the object and reload the datagrid. I&#8217;ll elaborate on this later, by showing you some code and perhaps an online example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/12/15/propel-pager-datagrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio Performance</title>
		<link>http://www.lifelog.be/2006/12/08/zend-studio-performance/</link>
		<comments>http://www.lifelog.be/2006/12/08/zend-studio-performance/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 13:27:00 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2006/zend-studio-performance/</guid>
		<description><![CDATA[Lately i noticed Zend Studio wasn&#8217;t running as smooth as before. When going into hibernate or logging off, i often notice javaw.exe has crashed, that caused the system not to shut down. To fix this problem i&#8217;ve found several solutions, i&#8217;ll list those here for future reference : make sure the power settings do not [...]]]></description>
			<content:encoded><![CDATA[<p>Lately i noticed Zend Studio wasn&#8217;t running as smooth as before. When going into hibernate or logging off, i often notice javaw.exe has crashed, that caused the system not to shut down. To fix this problem i&#8217;ve found several solutions, i&#8217;ll list those here for future reference :</p>
<ul>
<li>make sure the power settings do not use the option to enable cpu throttling (this seems to be a java issue)</li>
<li>try replacing zends jre by JRE 6 (<a target="_blank" title="JRE6" href="http://java.sun.com/javase/6/download.jsp">http://java.sun.com/javase/6/download.jsp</a>)</li>
<li>disable the OS look&#038;feel in your zend application</li>
<li>disable all power management for your video card</li>
<li>if you are using a dual monitor setup, make sure the editor &#038; palettes are on the same monitor/display</li>
<li>remove the Zend Project cache file : <span class="MsgBodyText">/Documents and Settings/{Win username}/ZDE/config_5.1/caches/</span></li>
<li><span class="MsgBodyText">expand the heap sizes (to more then 256 MB) the JRE needs for the Studio to function </span><span class="MsgBodyText"> [file: {studiopath}/bin/ZDE.lax]</span><span class="MsgBodyText"><br />
</span></li>
<li><span class="MsgBodyText">if you have a 64b machine, make sure you have the 64bit java lib</span></li>
<li><span class="MsgBodyText">try disabling your antivirus for a second and check if performance goes up<br />
</span></li>
<li><span class="MsgBodyText">if you are using an external subversion client (not ZDE&#8217;s), make sure your options in ZDE are on CVS. (options > source control). Performance gets a huge boost (integrated svn is causing a problem when using 3th party tools)<br />
</span></li>
<li><span class="MsgBodyText">submit a support ticket (<a target="_blank" href="http://www.zend.com/support">http://www.zend.com/support</a>) (make sure to mention you tried all t he above steps, and provide as much detail as possible, because they won&#8217;t fix your problem  untill they have everything they are looking for : hardware, software, ZDE.log, description of the project)<br />
</span></li>
</ul>
<blockquote><p>Here&#8217;s the info I found posted over at the PhpBuilder.com Zend Studio Forum by MStaniszczak (post is no longer there).  This item addresses the speed of the java virtual machine, and for those of us running Intel processors, this tends to be faster than the Sun JRE. If you&#8217;ve got an AMD processor, this may or may not yield any performance.</p></blockquote>
<blockquote><p>Head on over to BEA Systems and get the JRockit 5.0 JRE. Don&#8217;t worry about the SDK, unless you&#8217;re a Java programmer. It&#8217;s about 30 megs, so dial-up beware.  After downloading it, extract the exe (right click, extract archive).</p></blockquote>
<blockquote><p>After you&#8217;ve done that, you should see some files, as well as another archive or zip file named something like win_ia32_jrockit150_04_jre.zip. You&#8217;ll want to extract that as well, to it&#8217;s own directory or folder (name it jre) , and that&#8217;s going to be what we need.</p></blockquote>
<blockquote><p>First, make sure the ZDE is not currently running. If it is, exit it. Now, find your installation of the Zend Studio client. It should be something like C:/Program Files/Zend/ZendStudioClient-5.0.0/. You&#8217;ll see a directory already named jre. Rename it to jre_old. Copy the directory we created from the archive into the ZendStudioClient-5.0.0/ directory.</p></blockquote>
<p>For me the HEAP size, in combination with the source control tab (to cvs) did it, as i am using tortoisesvn for version management.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/12/08/zend-studio-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Killer PHP Applications</title>
		<link>http://www.lifelog.be/2006/10/31/writing-killer-php-applications/</link>
		<comments>http://www.lifelog.be/2006/10/31/writing-killer-php-applications/#comments</comments>
		<pubDate>Tue, 31 Oct 2006 18:11:05 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[hints]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2006/writing-killer-php-applications/</guid>
		<description><![CDATA[Because i still have a quite visited blog (disabled comments though), i will try to post some web development idea&#8217;s / articles on a regular base. As a full-time webdeveloper i find it very important to have the right tools. I&#8217;ve told you before, as a development machine i am still using a WAMP set-up [...]]]></description>
			<content:encoded><![CDATA[<p>Because i still have a quite visited blog (disabled comments though), i will try to post some web development idea&#8217;s / articles on a regular base. As a full-time webdeveloper i find it very important to have the right tools. I&#8217;ve <a href="/2006/vmware/">told you before</a>, as a development machine i am still using a <a title="Wampserver" target="_blank" href="http://www.wampserver.com/en/">WAMP</a> set-up (Windows, Apache, Mysql, Php), whenever i finish some work on a project, i commit the code changes to a subversion repository (running on a Debian machine). The subversion server accepts connections over secured http to make sure no-one is reading / sniffing. To my opinion, the best tool to handle your svn actions (merge, commit, update) on a Windows platform is <a title="TortoiseSVN" target="_blank" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, they release regular updates, supports almost every svn action and has great documentation.</p>
<p>The most important in my daily development is my IDE, for the last three years i have been using <a title="Zend Studio" target="_blank" href="http://www.zend.com/products/zend_studio">Zend Studio Professional,</a>  at this moment i think (and i&#8217;m pretty sure), it&#8217;s the best PHP IDE Around. It has debugging capabilities, code completion, svn/cvs integration (although i prefer tortoisesvn, see above), but ofcourse it can&#8217;t be perfect&#8230;(i do expect it to come close for 300$/year).<br />
One thing i don&#8217;t like about the Zend IDE (besides the pricing), are the updates. Zend is quite slow on the updates, (they might have <a title="Zend/Eclipse PHP IDE" target="_blank" href="http://www.zend.com/phpide/">too</a> <a title="PHP6 Unicode Zend" target="_blank" href="http://www.zend.com/zend/week/php-unicode-design.txt">much</a> <a title="Zend / IBM" target="_blank" href="http://opensource.sys-con.com/read/141508.htm">todo</a>), but as a registered &#038; paying customer, i think some major fixes (Javascript errors in internal browser, Linux Visual Interface, Crashes) in Zend Studio 5.2.0 have a higher priority then <a title="Eclipse together with Zend" target="_blank" href="http://www.eclipse.org/proposals/php-ide/">deciding to build a new IDE</a> when the current one is not finished (it never is). Nevertheless, this IDE is still the best PHP Editor around, in combination with the Zend Platform (free for developer licences &#038; combined in the Zend Pro licence) you&#8217;ve got yourself a kickass debugging system containing the most important features as breakpoints, watches, stacks and output buffering.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/10/31/writing-killer-php-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internationalization &#8211; seo &#8211; mod_rewrite : Part II</title>
		<link>http://www.lifelog.be/2006/08/02/internationalization-seo-mod_rewrite-part-ii/</link>
		<comments>http://www.lifelog.be/2006/08/02/internationalization-seo-mod_rewrite-part-ii/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 11:06:43 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[frameworks]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[webhosting]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2006/08/02/internationalization-seo-mod_rewrite-part-ii/</guid>
		<description><![CDATA[As a follow-up to my previous post (Internationalization &#8211; seo &#8211; mod_rewrite : Part I). If you followed my previous instructions, by now you should be the proud owner of a &#8216;google sitemaps&#8216; account and your webhost supports statistics that can tell you when a crawlbot visited your website (or raw logs, if you&#8217;re a [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow-up to <a title="Previous post" href="/2006/07/10/internationalization-bot-crawling-php-mod_rewrite-part-1/">my previous post</a> (<a title="Internationalization - SEO - mod_rewrite : Part I" href="/2006/07/10/internationalization-bot-crawling-php-mod_rewrite-part-1/">Internationalization &#8211; seo &#8211; mod_rewrite : Part I</a>). If you followed my previous instructions, by now you should be the proud owner of a &#8216;<a class="external" title="Google Sitemaps" target="_blank" href="https://www.google.com/webmasters/sitemaps/">google sitemaps</a>&#8216; account and your webhost supports statistics that can tell you when a crawlbot visited your website (or raw logs, if you&#8217;re a sherlock holmes type).</p>
<p>Because you are reading this howto, i can conclude you have a website running on a domain or atleast a subdomain. For multi-language systems i prefer using the subdomain to set the language of the user. So if you were using www.mydomain.tld/index.php?lang=en before, you will now be using en.mydomain.tld. For a website with multiple languages that would become :</p>
<ul>
<li>www.mydomain.tld : would point to the default language, or will relocate the user based on browser/os/nslookup (whatever you prefer)</li>
<li>en.mydomain.tld : would point to the website in english</li>
<li>fr.mydomain.tld : would point to the website in french</li>
<li>X.mydomain.tld : would point to the website in &#8230;</li>
</ul>
<p>If you are using a subdomain this could be done with en.subdomain.mydomain.tld etc&#8230;.<br />
This way of working has some advantages :</p>
<ul>
<li>users will be able to bookmark directly in their language.</li>
<li>Search engine optimalisation can be targetted on subdomains seperately</li>
<li>crawlbots will easily know which language they are crawling (also due to <meta /> tag)</li>
</ul>
<p><strong>Step 1 : Set up your nameserver records</strong></p>
<p>Make sure the A records all point to the same adress, i prefer setting a records for all different languages as i do not want to point *.domain.tld to the website (for various reasons). As this is not a dns administration guide, try to find more information in the docs of your dns daemon, but before doing that check if undefined subdomains do not already point to the same ip as your main domain,  this could be the case and then no configuration is needed&#8230;</p>
<p>You can check this by doing :</p>
<blockquote>
<pre><code allow="none"> ping mydomain.tld</code></pre>
</blockquote>
<p>Compare the result ip adress with a ping to a subdomain :</p>
<blockquote>
<pre><code allow="none"> ping en.mydomain.tld</code></pre>
</blockquote>
<p>If both ip match, you will most probably have the right nameserver configuration already, you can go straight to step 2.</p>
<p><strong>Step 2 : Make sure the webserver catches the subdomain</strong></p>
<p>As i am using apache only at this moment, i will only explain you briefly how to do this in apache, for all other webservers check the documentation. Try to look for the virtualhost directive of your domain in the webserver configuration, by default this will be in /etc/httpd/conf, searching for httpd.conf, apache.conf or apache2.conf will tell you where it&#8217;s located&#8230;If you split up your virtualhost directives in different files, you are most probably clever enough to find your virtualhost directive, if you didn&#8217;t check the bottom of your configation file, there should be something like this :</p>
<blockquote>
<pre><code allow="none">

<VirtualHost *:80>
  ServerName yourdomain
  DocumentRoot "/path/to/your/webroot"
  DirectoryIndex index.php
  <Directory "/path/to/your/webroot">
   AllowOverride All
   Order allow,deny
   Allow from All
  </Directory>
</VirtualHost>
</code></pre>
</blockquote>
<p>Add a serveralias, so apache knows to catch the subdomains, there are 2 ways of doing this, you can add a ServerAlias for all different languages, or you could add a * alias, so from now on apache will catch all unknown subdomains for this domain.</p>
<p><strong>Option 1 : Catch only the subdomains i want</strong></p>
<blockquote>
<pre><code allow="none">

<VirtualHost *:80>
  ServerName yourdomain
  ServerAlias language1.yourdomain
  ServerAlias language2.yourdomain
  DocumentRoot "/path/to/your/webroot"
  DirectoryIndex index.php
  <Directory "/path/to/your/webroot">
   AllowOverride All
   Order allow,deny
   Allow from All
  </Directory>
</VirtualHost>
</code></pre>
</blockquote>
<p><strong>Option 2 : Catch all subdomains</strong></p>
<blockquote>
<pre><code allow="none">

<VirtualHost *:80>
  ServerName yourdomain
  ServerAlias *.yourdomain
  DocumentRoot "/path/to/your/webroot"
  DirectoryIndex index.php
  <Directory "/path/to/your/webroot">
   AllowOverride All
   Order allow,deny
   Allow from All
  </Directory>
</VirtualHost>
</code></pre>
</blockquote>
<p>Save your virtualhost config file, or main webserver configuration file and restart your webserver</p>
<blockquote>
<pre><code allow="none"> apachectrl -k restart</code></pre>
</blockquote>
<p><a target='_blank' title='more info on setting apache vhost alias' href="http://httpd.apache.org/docs/1.3/mod/core.html#serveralias">More information on setting Apache virtualhosts serveralias&#8217;es</a>.</p>
<p>You should now be able to see the same website you had before, using the lang.mydomain.tld subdomains, if this is not the case, check your include paths etc&#8230;.I have to stop this howto for now, we will go the the coding itself in Part III</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/08/02/internationalization-seo-mod_rewrite-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first project in Symfony</title>
		<link>http://www.lifelog.be/2006/07/11/my-first-project-in-symfony/</link>
		<comments>http://www.lifelog.be/2006/07/11/my-first-project-in-symfony/#comments</comments>
		<pubDate>Tue, 11 Jul 2006 14:19:02 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2006/07/06/my-first-project-in-symfony/</guid>
		<description><![CDATA[I&#8217;ve started on a project using a very good framework i am pleased about. If you take your time to have a look around on the website, you can clearly see this is a framework with alot of documentation, one of the major requirements for selection (in my case). I decided to give it a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started on a project using a <a target="_blank" title="Symfony Project" class="external external external external external external" href="http://www.symfony-project.com/weblog.html">very good framework</a> i am pleased about. If you take your time to have a look around on the website, you can clearly see this is a framework with <a target="_blank" title="Symfony Framework documentation" class="external external external external external external" href="http://www.symfony-project.com/content/documentation.html">alot of documentation</a>, one of the major requirements for selection (in my case).</p>
<p>I decided to give it a go and use the framework on my latest project for EuPR (<a target="_blank" title="Plastics Recyclers" href="http://www.lifelog.be/www.plasticsrecyclers.eu">www.plasticsrecyclers.eu</a>), as the timeframe for this project was quite limited, i needed a good framework, with plenty of documentation to solve the issues i would run into&#8230;</p>
<p>A snippet from the <a class="external external external external external" title="About Symfony Framework" target="_blank" href="http://www.symfony-project.com/content/about.html">symfony about page</a> :</p>
<blockquote><p>Symfony is a <strong>web application framework</strong> for PHP5 projects.</p>
<p>It aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure.</p>
<p>The very small number of prerequisites make symfony <strong>easy to install</strong> on any configuration; you just need Unix or Windows with a web server and PHP 5 installed. It is compatible with almost every database system. In addition, it has a very <strong>small overhead</strong>, so the benefits of the framework don&#8217;t come at the cost of an increase of hosting costs.</p></blockquote>
<p>If you want to have a look at the results, go over to <a target="_blank" title="EPSE" href="http://www.lifelog.be/www.plasticsrecyclers.eu">plasticsrecyclers.eu</a>, i implented a login form, upload functionality (in different categories and a pager to browse through the various results of newsletters &#038; documents&#8230;Keep in note that this is a &#8220;non-released&#8221; website still open for feedback &#038; improvements&#8230;.</p>
<p>Whatta ya think ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/07/11/my-first-project-in-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internationalization &#8211; seo &#8211; mod_rewrite : Part 1</title>
		<link>http://www.lifelog.be/2006/07/10/internationalization-bot-crawling-php-mod_rewrite-part-1/</link>
		<comments>http://www.lifelog.be/2006/07/10/internationalization-bot-crawling-php-mod_rewrite-part-1/#comments</comments>
		<pubDate>Mon, 10 Jul 2006 14:57:17 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[webhosting]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/2006/07/10/internationalization-bot-crawling-php-mod_rewrite-part-1/</guid>
		<description><![CDATA[I am running a pretty big company website that uses multiple languages so users can browse the website in their language. Lately i have been working on the Search Engine Optimalisation, and i noticed google (and some other crawl bots) do not correctly crawl the other languages, this had something todo with various reasons : [...]]]></description>
			<content:encoded><![CDATA[<p>I am running a pretty big company website that uses multiple languages so users can browse the website in their language. Lately i have been working on the Search Engine Optimalisation, and i noticed google (and some other crawl bots) do not correctly crawl the other languages, this had something todo with various reasons :</p>
<ul>
<li>language selection was saved in session or by $_GET argument</li>
<li>meta language tag was not always set</li>
<li>there was no clear line how the language was selected, user couldn&#8217;t see by url which language he selected</li>
</ul>
<p>I did a few lookups on the internet, some various SEO forums, and i&#8217;ve collected this information and, with the help of Apache mod_rewrite, turned the website into a fancy, easy-to-use, multilanguage environment, and this is how i did it. I will explain you in 3 different parts, which i will try to finish in the upcoming 3 days&#8230;.</p>
<p>To start off i am using .xml files to hold all the different language strings, nowadays you can find some php frameworks that fully support i18n, but back in the days i was making international websites, they were not that commonly available. If you would go for a framework i would choose <a target="_blank" title="MVC Framework in PHP" class="external external external external external external external external external external" href="http://www.mojavi.org">Mojavi</a>, <a target="_blank" title="ANother MVC framework with I18N" class="external external external external external external external external external external" href="http://www.xisc.com">Prado</a> or <a target="_blank" title="Symfony Project" class="external external external external external external external external external external" href="http://www.symfony-project.com">Symfony</a>, i am not going to elaborate on that, as this post is not about frameworks, but howto put different languages on your website, and making sure google (and other search engines), crawl em like they should&#8230;.</p>
<p>Start off by making sure you have a <a target="_blank" title="Google Sitemaps" class="external external external external external external external external external external" href="https://www.google.com/webmasters/sitemaps/">google sitemaps</a> account and have a way to gather website statistics, very good would be a package where you can list the crawl bots seperately (i prefer awstats)</p>
<p>Sitemaps what/where went wrong when crawling your site. The Google Sitemaps program has two major components:</p>
<ul>
<li><a class="external external external external external external external external external external" href="http://www.google.com/support/webmasters/bin/topic.py?topic=8464">Google Sitemaps Console:</a> Provides statistics and error information about your site, as well as tools for managing your site.</li>
<li><a class="external external external external external external external external external external" href="http://www.google.com/support/webmasters/bin/topic.py?topic=8476">Google Sitemaps files:</a> Enable you to tell us what pages are present on your site.</li>
</ul>
<p>I&#8217;ll leave you the time to make sure you have both of the above items + it&#8217;s a really nice excuse to stop writing and do something else&#8230;Part II soon&#8230;</p>
<p><a title="Awstats" class="imagelink" onclick="doPopup(31);return false;" href="http://www.lifelog.be/wp-content/awstats.jpg"><img width="128" height="52" alt="Awstats" id="image31" src="http://www.lifelog.be/wp-content/awstats.thumbnail.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/07/10/internationalization-bot-crawling-php-mod_rewrite-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Development Week</title>
		<link>http://www.lifelog.be/2006/02/03/another-development-week/</link>
		<comments>http://www.lifelog.be/2006/02/03/another-development-week/#comments</comments>
		<pubDate>Fri, 03 Feb 2006 18:35:33 +0000</pubDate>
		<dc:creator>snk00sj</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Tech-Stuff]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lifelog.be/?p=24</guid>
		<description><![CDATA[At this moment i am managing a project with 3 programmers and a designer. Because of the deadline of the project i had to allocate some extra resources to make sure everything is finished in time. We are creating a system to analyse &#8220;Post Construction Waste&#8221; that is being transferred in Europe. To satisfy the [...]]]></description>
			<content:encoded><![CDATA[<p>At this moment i am managing <a target="_blank" title="Recovinyl" href="http://www.recovinyl.com">a project</a> with 3 programmers and a designer. Because of the deadline of the project i had to allocate some extra resources to make sure everything is finished in time.</p>
<p>We are creating a system to analyse &#8220;Post Construction Waste&#8221; that is being transferred in Europe. To satisfy the need of our customer we designed a [tag]framework[/tag] that uses some of the most recent technologies including ajax, output caching, templating, xml language parsing and more&#8230;Because i prefer working with the recent available technologies, we decided to develop the project in <a target="_blank" title="download php" href="http://www.php.net/downloads.php">php5</a>, mainly because of the new/extended <a target="_blank" title="Wiki OOP" href="http://en.wikipedia.org/wiki/Object-oriented_programming">oop</a> features and exception handling.</p>
<p>For version management we use <a target="_blank" title="Subversion" href="http://subversion.tigris.org/">Subversion</a>, on my windows machine powered by <a target="_blank" title="Tortoisesvn" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> with some extra scripts to commit/update/export with a simple click of the mouse (or shortcut combination). I noticed this week we crossed revision 700, we passed the cape of 500 programming hours on this project too&#8230;.Time to move to the next one ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelog.be/2006/02/03/another-development-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

