<?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; application</title>
	<atom:link href="http://www.lifelog.be/tag/application/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>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>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>
	</channel>
</rss>

