<?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>Hello.World &#187; PHP</title>
	<atom:link href="http://matthew.delmarters.com/weblog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://matthew.delmarters.com</link>
	<description>The Blog of Matthew Delmarter</description>
	<lastBuildDate>Sat, 10 Dec 2011 09:42:39 +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>Zend Studio 8.0.1 Update Released</title>
		<link>http://matthew.delmarters.com/weblog/zend-studio-8-0-1-update-released/</link>
		<comments>http://matthew.delmarters.com/weblog/zend-studio-8-0-1-update-released/#comments</comments>
		<pubDate>Mon, 23 May 2011 22:30:09 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend Studio]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/?p=380</guid>
		<description><![CDATA[When I opened Zend Studio this morning there was a prompt to upgrade to the latest version, 8.0.1. But I could not find any details around what has actually changed. I eventually tracked some information down in some zend forum posts &#8211; here is a summary from what I understand: [fixed] In large PHP files [...]]]></description>
			<content:encoded><![CDATA[<p>When I opened Zend Studio this morning there was a prompt to upgrade to the latest version, 8.0.1. But I could not find any details around what has actually changed. I eventually tracked some information down in some zend forum posts &#8211; here is a summary from what I understand:</p>
<p><strong>[fixed]</strong> In large PHP files (over 2000 lines) code parsing was very slow.<br />
<strong>[fixed]</strong> Built-In PHP executables crashed on Warning or Error during local run/debug.<br />
<strong>[fixed]</strong> JavaScript Validator threw Java Null Pointer Exception.<br />
<strong>[fixed]</strong> Error "Unsupported Content Type" occurred when opening a PHP file from the SVN Repositories or CVS Repositories view.<br />
<strong>[fixed]</strong> Using the keyboard shortcut Toggle Breakpoint (Ctrl+Shift+B) resulted in a breakpoint of a wrong type (JS instead of PHP). NB: the fix will work only after workspace reset.<br />
<strong>[fixed]</strong> Hyperlinks in tooltips were not working.<br />
<strong>[fixed]</strong> Code Formatter used to remove the leading backslash in namespaced paths.<br />
<strong>[fixed]</strong> When opening the Project Properties through the main menu (Project | Properties) the Remote Server Support page was not available.<br />
<strong>[fixed]</strong> Refactor/Rename keyboard shortcut (Shift+Alt+R) was not working due to a conflict.</p>
<p><strong>[improvement]</strong> Remote Server Support does not perform full re-scan of the remote resources, unless necessary.<br />
<strong>[improvement]</strong> The Remote Search page has been removed from the Search dialog, because this functionality does not exist.<br />
<strong>[improvement]</strong> Added keyboard shortcuts for file upload/download in Remote Server Support (Shift+Alt+P,U and Shift+Alt+P,D).<br />
<strong>[improvement]</strong> PHP 5.3 is the new workspace default.</p>
<p><strong>[update]</strong> Zend Framework Example Project (Guestbook) has been updated to the latest version from the Zend Framework project site.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/zend-studio-8-0-1-update-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging in Zend Studio without Zend Platform</title>
		<link>http://matthew.delmarters.com/weblog/debugging-in-zend-studio-without-zend-platform/</link>
		<comments>http://matthew.delmarters.com/weblog/debugging-in-zend-studio-without-zend-platform/#comments</comments>
		<pubDate>Sun, 03 Jun 2007 17:14:23 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/debugging-in-zend-studio-without-zend-platform/</guid>
		<description><![CDATA[I have been using Zend Studio for quite a while now as my primary PHP IDE. To get the powerful remote debugging and profiling that comes with the tool you used to have to install Zend Studio Server as well. With the release of version 5.5 however, Zend stopped shipping Studio Server and forced developers [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using <a href="http://www.zend.com/products/zend_studio">Zend Studio</a> for quite a while now as my primary PHP IDE. To get the powerful remote debugging and profiling that comes with the tool you used to have to install Zend Studio Server as well. With the release of version 5.5 however, Zend stopped shipping Studio Server and forced developers to install the Zend Platform instead. This is a commercial tool (free to developers) available from Zend that offers PHP acceleration, caching and other features &#8230; that I don't want! I just want my debugging back, without having to bloat my local server with software I will not use elsewhere &#8211; especially when the Zend Platform does not support APC, which we run on our servers, and it also <a href="http://www.zend.com/forums/index.php?t=msg&#038;th=1712&#038;start=0&#038;S=d4c06ca7f03d24df9d09b3982594bab1">broke my web application</a>.</p>
<p>It turns out that we do not need the Zend Platform at all. As part of the <a href="http://www.eclipse.org/pdt/">PDT Eclipse</a> project Zend has made available a standalone version of their debugger. This can be downloaded from here: <a href="http://downloads.zend.com/pdt/server-debugger/">http://downloads.zend.com/pdt/server-debugger/</a></p>
<p>Then you just need to put the .so or .dll file in the correct location and add a few lines to your PHP.INI file and you are away. Here are the lines I had to add to my PHP.INI, which is running inside a Debian VMWare image. Note the commas separating the IP numbers &#8211; this took me a few goes to work out as the examples showed spaces or forward-slashes which didn't work for me.</p>
<div class="VisualSyntax"><code><span style="color: #000000"></p>
<p>zend_extension=/etc/Zend/ZendDebugger.so<br />
zend_debugger.allow_hosts=192.168.1.3,192.168.220.1,192.168.150.1,127.0.0.1,192.168.220.10<br />
zend_debugger.expose_remotely=always<br />
</span><br />
</code></div>
<p>Why did Zend make this so hard to work out? Reading on different blogs and through the Zend forums highlights that this issue has been a source of frustration for many developers. Grrrr&#8230;<!--b6360c37ce128c21e8f89dccb986105c--><!--77a61b8d1b636718fbc0e614fd1916d9--><!--bbb30c34e3cd791626082cec08ecb991--><!--f0abb8ce342cc87d3e555316da29b942--><!--5823fea1193ebe45b54bd62dc75461b8--><!--dbaceb0de9eb93b3b398424847ca06b0--><!--bbb30c34e3cd791626082cec08ecb991--><!--f0abb8ce342cc87d3e555316da29b942--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/debugging-in-zend-studio-without-zend-platform/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating Random Sample Data</title>
		<link>http://matthew.delmarters.com/weblog/generating-random-sample-data/</link>
		<comments>http://matthew.delmarters.com/weblog/generating-random-sample-data/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 10:52:33 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/generating-random-sample-data/</guid>
		<description><![CDATA[I found a very useful tool today &#8211; the Data Generator. It generates large volumes of random, custom data for use in testing software. The tool is a free download, and can generate data in the following formats: HTML Excel XML CSV SQL There is an online demo available that is limited to 200 results. [...]]]></description>
			<content:encoded><![CDATA[<p>I found a very useful tool today &#8211; the <a href="http://www.benjaminkeen.com/software/data_generator/">Data Generator</a>. It generates large volumes of random, custom data for use in testing software. The tool is a free download, and can generate data in the following formats:</p>
<blockquote>
<ul>
<li>HTML</li>
<li>Excel</li>
<li>XML</li>
<li>CSV</li>
<li>SQL</li>
</ul>
</blockquote>
<p>There is an online demo available that is limited to 200 results. <a href="http://www.benjaminkeen.com/software/data_generator/">Click here</a> to find out more&#8230;<!--d28f225a8a0107210ef11b7e4da6d7c1--><!--5f28e03fe7ad88dd7e25792c4a963cb7--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/generating-random-sample-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Injecting JavaScript and CSS into Iframes</title>
		<link>http://matthew.delmarters.com/weblog/injecting-javascript-and-css-into-iframes/</link>
		<comments>http://matthew.delmarters.com/weblog/injecting-javascript-and-css-into-iframes/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 13:30:23 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/injecting-javascript-and-css-into-iframes/</guid>
		<description><![CDATA[Introducing a new technique to allow efficient reuse of JavaScript and CSS &#8211; effectively allowing you to download the code once and then inject it into Iframes. This solution is targeted at Web Applications which commonly use Iframes for complex layouts and to control memory usage in larger apps without moving to the complexity of [...]]]></description>
			<content:encoded><![CDATA[<p><em style="color:#858585">Introducing a new technique to allow efficient reuse of JavaScript and CSS &#8211; effectively allowing you to download the code once and then inject it into Iframes. This solution is targeted at Web Applications which commonly use Iframes for complex layouts and to control memory usage in larger apps without moving to the complexity of a Single Page Interface (SPI). Along the way we summarise and explain other methods available to developers for minimising their code and speeding up the loading time of their application.</em></p>
<p>With the next generation of Web Applications upon us the challenges faced by the average web developer have broadened. Understanding and confronting issues like memory leaks, bandwidth, load times and JavaScript processing time is becoming more of an everyday focus for web developers than ever before. </p>
<p>Fortunately we now have the tools available to help. On the developers machine the <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a> and <a href="http://www.getfirebug.com/">Firebug</a> for example are essential. And within the applications themselves we find increased usage of JavaScript libraries such as <a href="http://dojotoolkit.org/">Dojo</a>, <a href="http://jquery.com">jQuery</a>, <a href="http://www.prototypejs.org/">Prototype</a>, <a href="http://developer.yahoo.com/yui/">YUI</a> and widget frameworks like <a href="http://www.extjs.com">Ext</a>, which provide a layer of abstraction and freedom for developers from some of these issues.</p>
<p>The increased usage of JavaScript however brings other challenges. Particularly in the world of Web Applications where the use of Widgets (tabs, grids, menus etc) is more likely, it is not uncommon for the volume of JavaScript and CSS to quickly accumulate from tens to a few hundred kb of code. This is a far cry from ideal, but is also to a certain extent unavoidable if that is the type of application you are supporting. </p>
<p>What can a developer do to minimise this issue? There are several very effective methods that can be explored:</p>
<blockquote>
<p><strong>Compacting Your Code</strong><br />
This is acheived by stripping out comments and unneccesary white-space which can drastically reduce the size of your files &#8211; sometimes cutting them in half. Recommended tools: <a href="http://dean.edwards.name/packer/">Dean Edwards Packer</a> or <a href="http://www.crockford.com/javascript/jsmin.html">Douglas Crockford's JSMin</a>. You could apply the same theory to your CSS as well.</p>
<p><strong>File Compression</strong><br />
Using GZIP or Deflate can drastically reduce the downloaded file size (but should be used wisely). You can read more on this <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/">here</a>.</p>
<p><strong>Combining Multiple Files</strong><br />
In general browsers download only two or four files in parallel per hostname, depending on the HTTP version of the response and the userâ€™s browser. On top of that it seems that JavaScript files are loaded synchronously and sequentially as they appear in your code. This means that only one JavaScript file can be downloaded at a time &#8211; and each file must be completely downloaded and then interpreted before the next download can begin. Reducing the number of HTTP requests by combining your JavaScript and CSS files into single files will definitely help improve your applications response times. Using <a href="http://www.alistapart.com/articles/sprites/">CSS Sprites</a> to combine your images into a single file and re-use with CSS is also an extension of this principle and is a very effective technique.</p>
<p><strong>Caching</strong><br />
Server-side caching can help speed the up the delivery of page content. Also understanding browser caching and how to control this using file headers can make a difference &#8211; but again should be used wisely.</p>
</blockquote>
<p>These techniques have been around for quite a while now. But this leads me to the real point of this post!</p>
<h4>"Injection" Introduced</h4>
<p>When it comes to the world of Web Applications (as opposed to a "website") where the use of Iframes is more likely, there is another technique that can be explored &#8211; "Code Injection". </p>
<p>I became aware of this technique while trying to interpret some very lengthy posts from <a href="http://extjs.com/forum/showthread.php?t=1201">Choleriker</a> on the <a href="http://extjs.com/forum/showthread.php?t=1201">Ext forums</a>. I thank Choleriker for taking the time to explain the concepts. I thought I would share my interpretation of this technique, as well as provide some examples to see it in action as requested by other developers in the forums.</p>
<p>First of all &#8211; what is this "code injection" that I am referring to? </p>
<p><strong>Explained</strong><br />
In breif, the technique basically involves loading your JavaScript and CSS only once and then re-using it inside any iframes without downloading it again. This is acheived by loading your code "inline" inside the top level page of the application. The top page then makes the JavaScript and CSS available as two variables that can be called from the iframes directly. So the code is passed or "injected" from the top level page into any iframes using JavaScript. </p>
<p><strong>Benefits?</strong><br />
There are several benefits to this technique &#8211; the most obvious being that you only download your JavaScript and CSS once, no additional downloads required. If you normally compress your JavaScript files using GZIP you likely know that there is a performance hit in the client browser to decompress the code before it can be used. This is no longer an issue for the reused code. And there is no longer any concerns with browser caching issues. Another big plus is that the CSS and JavaScript is being loaded as part of your actual page &#8211; i.e. there are no other additional files to download, which will improve the response times as described above. </p>
<p><strong>Downsides?</strong><br />
I guess that the technique requires iframes. In time I guess/hope the principles of the technique may be able to be used in other perhaps more elegant ways that I haven't thought of yet. Another downside is the need to load your JavaScript and CSS inline. This was initially repugnant to me, mainly due to my background in website development. But in an Application is it really a big deal? I have decided it does not outweight the benefits.</p>
<p>Another perceived downside is that you have to get all of your JavaScript and CSS into a format that is loaded inline &#8211; but of course you still want to work with your separate "clean" files as you are used to. <em>This should be viewed as an opportunity!</em> It is likely time to implement a number of techniques as discussed above. My recommended technique is to have a server-side script that does the following:</p>
<blockquote><ul>
<li>Combines the required JavaScript and CSS files</li>
<li>Compacts the code by stripped white-space, comments etc</li>
<li>Caches the output code to a file on the server</li>
<li>Include the code inline using PHP or some other scripting language</li>
</ul>
</blockquote>
<p>I may provide some code for doing this in PHP in the future. In the meantime you might want to look at the <a href="http://rakaz.nl/extra/code/combine">"Combine" script from Niels Leenheer</a> to get started.</p>
<p><strong>Sample Application</strong><br />
So &#8211; how about an example? Click on the image below to see this technique in action. The example is built using <a href="http://www.extjs.com">Ext 1.0 Beta 2</a>. It is a top level page which generates an Ext Layout with panels. The right-hand panel contains an iframe which receives the JavaScript and CSS from the top level page &#8211; it has not downloaded any files except the required images.</p>
<p><a onclick="window.open(this.href,'tree','width=850, height=500, resizable'); return false;" href="/ext_demo.htm" target="_blank"><img src="/images/screen_ext_demo.gif" alt="Launch Demo" border="0"/></a></p>
<p>The secret to this working is the following code in the Top Page:</p>
<div class="VisualSyntax"><code><span style="color: #000000"></p>
<p>&lt;textarea&nbsp;id="StyleProxy"&nbsp;style="display:none;visibility:hidden;"&gt;<br />
//&nbsp;CSS&nbsp;loaded&nbsp;inline&nbsp;here<br />
&lt;/textarea&gt;<br />
<font color='#990000'>&lt;script&nbsp;type="text/javascript"&gt;</font><br />
document.write(['<font color='#990099'>&lt;style&nbsp;type="text/css"&gt;</font>',document.getElementById('StyleProxy').innerHTML,'<font color='#990099'>&lt;/style&gt;</font>'].join('r'));<br />
<font color='#990000'>&lt;/script&gt;</font><br />
&nbsp;<br />
<font color='#990000'>&lt;script&nbsp;type="text/javascript"&nbsp;id="ScriptProxy"&gt;</font><br />
//&nbsp;JavaScript&nbsp;loaded&nbsp;inline&nbsp;here<br />
<font color='#990000'>&lt;/script&gt;</font><br />
&nbsp;<br />
<font color='#990000'>&lt;script&nbsp;type="text/javascript"&gt;</font><br />
//&nbsp;define&nbsp;the&nbsp;variables&nbsp;for&nbsp;storing&nbsp;the&nbsp;JavaScript&nbsp;and&nbsp;CSS<br />
var&nbsp;_SCRIPTS&nbsp;=&nbsp;null;<br />
var&nbsp;_STYLES&nbsp;=&nbsp;null;<br />
&nbsp;<br />
//&nbsp;use&nbsp;jQuery&nbsp;to&nbsp;run&nbsp;the&nbsp;JS&nbsp;once&nbsp;HTML&nbsp;is&nbsp;loaded<br />
$(document).ready(&nbsp;function()<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;place&nbsp;the&nbsp;JavaScript&nbsp;and&nbsp;CSS&nbsp;into&nbsp;the&nbsp;variables&nbsp;for&nbsp;reuse<br />
&nbsp;&nbsp;&nbsp;&nbsp;top.window._SCRIPTS&nbsp;=&nbsp;Ext.get("ScriptProxy").dom.innerHTML.toString();<br />
&nbsp;&nbsp;&nbsp;&nbsp;top.window._STYLES&nbsp;=&nbsp;Ext.get("StyleProxy").dom.innerHTML.toString();<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;an&nbsp;iframe&nbsp;and&nbsp;add&nbsp;to&nbsp;the&nbsp;DOM<br />
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;this&nbsp;should&nbsp;be&nbsp;always&nbsp;be&nbsp;done&nbsp;after&nbsp;the&nbsp;variables&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;for&nbsp;the&nbsp;JS&nbsp;and&nbsp;CSS&nbsp;are&nbsp;filled&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;$main_container&nbsp;=&nbsp;Ext.get("iframe_main_container");<br />
&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;$iframe_nav&nbsp;=&nbsp;Ext.DomHelper.append&nbsp;(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$main_container,&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"iframe",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"iframeMain",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"iframeMain",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"100%",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"100%",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frameborder:&nbsp;"no",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scrolling:&nbsp;&nbsp;&nbsp;"no",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ext_demo_iframe1.htm"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;);<br />
})<br />
<font color='#990000'>&lt;/script&gt;</font><br />
</span><br />
</code></div>
<p>A look at the files downloaded reveals the benefits &#8211; the iframe had nothing to download but the basic page itself. The JavaScript and CSS were downloaded only once as part of the top page. This top page was a reasonable size &#8211; but Ext is not small, and we can see the GZIP compression kicking in:</p>
<p><img src="/images/screen_ext_usage.gif" alt="File Usage" border="0"/></p>
<p><strong>Conclusion</strong><br />
So &#8211; should you use this technique? That depends on your application and your preference. The objective of this post was to simply introduce a concept that was new to me, and I am sure is new to many others. It is simply another technique to add to a developers toolbox. </p>
<p>PS: I am very interested what other developers think of this technique and what they perceive as the advantages and disadvantages. I also have a question &#8211; does this technique expose any security holes I should be aware of?<!--6d6b1b4de8bc913f0df079ec6f0777e4--><!--4ce4e86f1e5a884e58539db8b3ff8adf--><!--69e3edfea5da861f518fcd4c68d3f4e3--><!--fb0575a8326f533c1d72d763c7ce8190--><!--ef5584235cc46f03a38b863861d2aabb--><!--80ffdada19ce5dd47ca0489b26110ca4--><!--69e3edfea5da861f518fcd4c68d3f4e3--><!--fb0575a8326f533c1d72d763c7ce8190--><!--ef5584235cc46f03a38b863861d2aabb--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/injecting-javascript-and-css-into-iframes/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The &#8220;Month of PHP Bugs&#8221; Begins</title>
		<link>http://matthew.delmarters.com/weblog/the-month-of-php-bugs-begins/</link>
		<comments>http://matthew.delmarters.com/weblog/the-month-of-php-bugs-begins/#comments</comments>
		<pubDate>Fri, 02 Mar 2007 00:14:38 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/the-month-of-php-bugs-begins/</guid>
		<description><![CDATA[In an initiative to improve the sucurity of PHP, experts from the Hardened PHP Project have launched the "Month of PHP Bugs". Stefan Esserâ€™s, widely regarded as an authority on PHP security issues, plans to make daily disclosures on buffer overflows, double free vulnerabilities and trivial bypass bugs in PHPâ€™s protection features as part of [...]]]></description>
			<content:encoded><![CDATA[<p>In an initiative to improve the sucurity of PHP, experts from the <a href="http://www.hardened-php.net/">Hardened PHP Project</a> have launched the "<a href="http://www.php-security.org/">Month of PHP Bugs</a>". </p>
<p>Stefan Esserâ€™s, widely regarded as an authority on PHP security issues, plans to make daily disclosures on buffer overflows, double free vulnerabilities and trivial bypass bugs in PHPâ€™s protection features as part of a wider goal â€œto make people and especially the PHP developers aware that bugs in PHP exist.â€</p>
<p>Some of these bugs have already been addressed in PHP 5.2.1. Others are fixed by the <a href="http://www.hardened-php.net/suhosin/index.html">Suhosin patches and extensions</a> from Stefan Esser, which are freely downloadable <a href="http://www.hardened-php.net/suhosin/download.html">here</a>. Others hopefully will be addressed in the very near future by the PHP development team.</p>
<p>To find out more about this initiative visit the <a href="http://www.php-security.org/">PHP Security</a> website.<!--450567f9043516e585826f96e1b49e95--><!--28c7295079149a3eed1bab68f05ca054--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/the-month-of-php-bugs-begins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.2.1 Released &#8211; Time to Upgrade?</title>
		<link>http://matthew.delmarters.com/weblog/php-521-released-time-to-upgrade/</link>
		<comments>http://matthew.delmarters.com/weblog/php-521-released-time-to-upgrade/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 19:08:13 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/php-521-released-time-to-upgrade/</guid>
		<description><![CDATA[PHP 5.2.1 was officially released yesterday, and it is possibly the time for PHP 4 die-hards or PHP 5/5.1 users to upgrade. Why? Consider the following: New Features in PHP 5.2.1 New Extensions JSON (JavaScript Object Notation) Filter Extension (simple input validation) ZIP (Full zip compression support read &#038; write) Date (date manipulation functions/objects) __toString() [...]]]></description>
			<content:encoded><![CDATA[<p>PHP 5.2.1 was <a href="http://www.php.net/">officially released yesterday</a>, and it is possibly the time for PHP 4 die-hards or PHP 5/5.1 users to upgrade. Why? Consider the following:</p>
<p><strong>New Features in PHP 5.2.1</strong></p>
<ul>
<li>New Extensions</li>
<ul>
<li>JSON (JavaScript Object Notation)</li>
<li>Filter Extension (simple input validation)</li>
<li>ZIP (Full zip compression support read &#038; write)</li>
<li>Date (date manipulation functions/objects)</li>
</ul>
<li>__toString() now works everywhere</li>
<li>E_RECOVERABLE_ERROR (fewer fatal errors)</li>
<li>New SPL features (Regex Iterators, SplFileObject CSV support, Caching Iterator)</li>
<li>Data: stream support</li>
<li>And many other â€œminorâ€ features</li>
</ul>
<p><strong>Performance Enchantments</strong></p>
<ul>
<li>New &#038; Improved Memory Manager + Heap Protection</li>
<li>Faster include/require_once</li>
<li>Optimized str_replace() and implode() functions</li>
<li>Faster try {} catch {} blocks</li>
<li>Significantly faster performance on Win32</li>
<li>Optimized shutdown sequence</li>
<li>Many other optimizations</li>
</ul>
<p><strong>Improved Security</strong></p>
<ul>
<li>New configuration option allow_url_include (disabled by default)</li>
<li>Over 40 security fixes compared to any prior release.</li>
<li>More accurate memory usage tracking</li>
<li>Filter extension can help filter out hostile input preventing</li>
<li>XSS, SQL Injection and other nastiness.</li>
<li>Memory limit is always enabled.</li>
</ul>
<p><strong>Improved Stability</strong></p>
<ul>
<li>PHP 5.2.1 includes hundreds of bug fixes compared to previous releases, <em>over 300 since 5.1.6</em></li>
<li>Chances are that if youâ€™ve reported a PHP bug in the last 6-8 months, PHP 5.2.1 has the fix for it.</li>
</ul>
<p>If you are interested in migrating from earlier versions of PHP please see the <a href="http://ilia.ws/files/vancouver_php52.pdf">guide provided by Ilia Alshanetsky</a>.<!--6a01002ef36f2a43620f519f4700098e--><!--3d2b9f38485ae55e79b775494149a0a1--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/php-521-released-time-to-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio 5.5 with Zend Framework Support</title>
		<link>http://matthew.delmarters.com/weblog/zend-studio-55-with-zend-framework-support/</link>
		<comments>http://matthew.delmarters.com/weblog/zend-studio-55-with-zend-framework-support/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 19:09:09 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/zend-studio-55-with-zend-framework-support/</guid>
		<description><![CDATA[I have been waiting for an update to Zend Studio for a few months &#8211; particularly hoping for support of SubVersion 1.4. Zend delivers this and more in the beta release of Studio 5.5. One of the most exciting enhancements for me is the integration of support for the Zend Framework. Here is a complete [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://framework.zend.com"><img src="/images/zend_framework.gif" alt="Zend Framework" style="border: 0pt none ; padding-left: 12px;" align="right"></a>I have been waiting for an update to Zend Studio for a few months &#8211; particularly hoping for support of SubVersion 1.4. Zend delivers this and more in the beta release of Studio 5.5. One of the most exciting enhancements for me is the integration of support for the Zend Framework.</p>
<p>Here is a complete list of the feature enhancements in version 5.5:</p>
<blockquote><p>
<b>Zend Framework Integration:</b></p>
<ul>
<li>Enable code completion for Zend Framework</li>
<li>View Zend Framework classes and functions in the PHP Inspector View</li>
<li>View source and debug into Zend Framework code</li>
</ul>
<p>
<b>Source Control:</b></p>
<ul>
<li>Explorer: highlights file labels according to their status in source control (added, merged with conflicts, modified, not versioned and up to date)</li>
<li>Source Control file status highlighting is customizable (from the Preferences dialog)</li>
<li>Can easily switch between CVS and Subversion support</li>
<li>Support for Subversion 1.4</li>
</ul>
<p>
<b>PHP 5.2:</b>
</p>
<ul>
<li>New PHP 5.2 Support</li>
</ul>
<p>
<b>General:</b></p>
<ul>
<li>Installation support for Mactel (Install Anywhere 8 )</li>
<li>Support for antialiasing (via Preference settings)</li>
</ul>
<p>
<b>Editor:</b></p>
<ul>
<li>Supports opening URLs from the Editor using right click</li>
</ul>
<p>
<b>Web Services Support (SOAP):</b></p>
<ul>
<li>Support for URLs in SoapClient Constructors</li>
</ul>
<p><b>Java:</b></p>
<ul>
<li>Embedded Java code completion of packages and classes in PHP code</li>
<li>Configure the Workspace's default JRE / JDK</li>
<li>Configure project specific preferences</li>
<li>Nested Java code completion</li>
</ul>
<p>
<b>Zend Platform 3.0 Integration:</b></p>
<ul>
<li>View Zend Platform Events in a dedicated Events List window</li>
<li>Customize, sort and filter Event List entities</li>
<li>Limit number of visible rows and initiate auto refresh</li>
<li>View Events from user-selected servers</li>
<li>Direct access to Platform's Configuration dialog from the toolbar / menu</li>
<li>Configure Zend Platform's GUI URL and authentication information</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/zend-studio-55-with-zend-framework-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lucene and the Zend Framework</title>
		<link>http://matthew.delmarters.com/weblog/lucene-and-the-zend-framework/</link>
		<comments>http://matthew.delmarters.com/weblog/lucene-and-the-zend-framework/#comments</comments>
		<pubDate>Thu, 27 Apr 2006 07:17:43 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/lucene-and-the-zend-framework/</guid>
		<description><![CDATA[One of the most talked about features of the Zend Framework is its port of the Apache Lucene project &#8211; a Java-based full-text search-engine framework. The Zend Framework allows PHP developers to use Lucene without requiring additional PHP extensions or Java, or even a database. The theory is that Zend_Search_Lucene overcomes the usual limitations of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://framework.zend.com"><img src="/images/zend_framework.gif" alt="Zend Framework" style="border: 0pt none ; padding-left: 5px;" align="right"></a>One of the most talked about features of the Zend Framework is its port of the Apache Lucene project &#8211; a Java-based full-text search-engine framework. The Zend Framework allows PHP developers to use Lucene without requiring additional PHP extensions or Java, or even a database. </p>
<p>The theory is that Zend_Search_Lucene overcomes the usual limitations of relational databases with features such as:</p>
<blockquote><ul>
<li>Fast indexing</li>
<li>Ranked result sets</li>
<li>A powerful but simple query syntax</li>
<li>The ability to index multiple fields</li>
</ul>
</blockquote>
<p>Lucene is well-known for it's speed. For an example have a look at <a href="http://www.damnfastdotlucene.org/">DamnFastDotLucene</a> &#8211; this demo site tests the performance of a .Net implementation of Lucene on quite a large set of documents:</p>
<blockquote><ul>
<li>9150 text files from the <a href="http://www.gutenberg.org/">Gutenberg Project</a></li>
<li>The total size of indexed documents is 3.5 GB</li>
<li>The index size is 880 MB</li>
<li>The Hardware: Pentium 4 3Ghz 800/1MB Cache, 1 GB DDRII Kingston 533, Western Digital Raptor 80GB</li>
</ul>
</blockquote>
<p>The result &#8211; it takes approximately the same time to search 5 MB of text as it does to search 3.5 GB of text. I was getting speeds less than 0.125 seconds. That is fast.</p>
<p>That was .Net though &#8211; what about the PHP implementation in the Zend Framework?</p>
<p>The reality for PHP developers using the Zend Framework may be a little different from the hype. Some developers are reporting Zend_Search_Lucene as being significantly slower than the queries being run from MySQL or PostGres. Have a look at the following comments in the <a href="http://www.zend.com/lists/fw-general/200604/msg00825.html">Zend Framework Mailing List</a> for details.</p>
<p>To be fair it is only very early days for the Zend Framework and Lucene &#8211; the project is still in early Alpha. However it is already being adopted by the community for live projects.</p>
<p>If you want to learn more about Zend_Search_Lucene I recommend the following links:</p>
<blockquote><ul>
<li><a href="http://www.phpriot.com/d/articles/php/search/zend-search-lucene/index.html">A new Tutorial on using Zend_Search_Lucene</a></li>
<li><a href="http://framework.zend.com/manual/en/zend.search.html">The Zend Framework Manual</a></li>
</ul>
</blockquote>
<p>If you have any experiences with Zend_Search_Lucene that you would like to share I would appreciate hearing about it&#8230;<!--dc146eaa621369973f03121fe75232d1--><!--217528742683b5deada618a9f8ec4f47--><!--902f1b6d162066310520d7f8ca716444--><!--9be7db09470988e8bbcfad71a7c81c0c--><!--dc146eaa621369973f03121fe75232d1--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/lucene-and-the-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do PHP Files Require Closing Tags?</title>
		<link>http://matthew.delmarters.com/weblog/do-php-files-require-closing-tags/</link>
		<comments>http://matthew.delmarters.com/weblog/do-php-files-require-closing-tags/#comments</comments>
		<pubDate>Wed, 08 Mar 2006 20:52:12 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/do-php-files-require-closing-tags/</guid>
		<description><![CDATA[I don't know about you &#8211; but I always learnt to open and close my PHP files properly: &#60;?php //&#160;Included&#160;PHP&#160;File //&#160;Code&#160;goes&#160;here ?&#62; And yet now I am learning for the very first time that the closing PHP tags are not necessary, and in fact in some cases is not recommended! The first clue I received [...]]]></description>
			<content:encoded><![CDATA[<p>I don't know about you &#8211; but I always learnt to open and close my PHP files properly:</p>
<div class="VisualSyntax"><code><span style="color: #000000"></p>
<p><span style="color: #0000BB"><b><span style='color:#333333; background-color:#FFFF00'>&lt;?php</span></b><br />
</span><span style="color: #FF8000">//&nbsp;Included&nbsp;PHP&nbsp;File<br />
//&nbsp;Code&nbsp;goes&nbsp;here<br />
</span><span style="color: #0000BB"><b><span style='color:#333333; background-color:#FFFF00'>?&gt;</span></b></span><br />
</span><br />
</code></div>
<p>And yet now I am learning for the very first time that the closing PHP tags are not necessary, and in fact in some cases is not recommended! </p>
<p>The first clue I received was when I downloaded the Zend Framework. I noticed that most of the files were missing the closing tags (?>). Then somebody raised the issue on the <a href="http://www.zend.com/lists/fw-general/200603/maillist.html">Zend Framework Mailing List</a> and the penny dropped:</p>
<ul>
<li>PHP files have apparently never required closing tags</li>
<li>Leaving out the closing tags helps prevent whitespace sneaking into the ouput and messing with functions like header(), session_register() functions etc.</li>
</ul>
<p>Well, that is definitely a new thought for me &#8211; and not one I have ever read anywhere. It sounds like it will make it into the <a href="http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html">Zend Coding Conventions</a> though, so take note <img src='http://matthew.delmarters.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <!--a047af7c9c764c04f36d1356d20494a0--><!--636daa6a887ea6db3532119c6336a7aa--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/do-php-files-require-closing-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework Tutorial</title>
		<link>http://matthew.delmarters.com/weblog/zend-framework-tutorial/</link>
		<comments>http://matthew.delmarters.com/weblog/zend-framework-tutorial/#comments</comments>
		<pubDate>Tue, 07 Mar 2006 21:50:07 +0000</pubDate>
		<dc:creator>Matthew Delmarter</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://matthew.delmarters.com/weblog/zend-framework-tutorial/</guid>
		<description><![CDATA[For those who want to get started on the Zend Framework, Chris Shiftlett has just written a 6 page tutorial for the php&#124;architect website. It is a good introduction to how the framework fits togethor, and will demonstrate how to structure a web application/site using the MVC (Model-View-Controller) approach. Chris Shiftlett is a PHP security [...]]]></description>
			<content:encoded><![CDATA[<p>For those who want to get started on the Zend Framework, Chris Shiftlett has just written a <a href="http://www.phparch.com/zftut/index.php?p=0">6 page tutorial</a> for the php|architect website. It is a good introduction to how the framework fits togethor, and will demonstrate how to structure a web application/site using the MVC (Model-View-Controller) approach. </p>
<p><a href="http://brainbulb.com/">Chris Shiftlett</a> is a PHP security consultant and he developed a lot of the security features (input filtering etc) in the framework &#8211; his tutorial is certainly <a href="http://www.phparch.com/zftut/index.php?p=0">worth a look</a>&#8230;<!--041e75d0f16569e0ff6ed77f0edfe6d5--><!--389f15e63cc56cc67eaf003c1b53700a--></p>
]]></content:encoded>
			<wfw:commentRss>http://matthew.delmarters.com/weblog/zend-framework-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

