<?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>Saiweb</title>
	<atom:link href="http://www.saiweb.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saiweb.co.uk</link>
	<description>Ramblings of a Sys admin</description>
	<lastBuildDate>Wed, 03 Mar 2010 16:06:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>RedHat Cluster OID&#8217;s</title>
		<link>http://www.saiweb.co.uk/linux/redhat-cluster-oids</link>
		<comments>http://www.saiweb.co.uk/linux/redhat-cluster-oids#comments</comments>
		<pubDate>Wed, 03 Mar 2010 16:05:56 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[oid]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=836</guid>
		<description><![CDATA[Following on from the python bindings post I found myself with a real problem,
the netsnmp bindings I could not for the life of me get to take the redhat cluste MIB files, so what did that leave me with, walking the entire parent cluster OID, manually matching the returned OID&#8217;s to their MIB names based [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fredhat-cluster-oids"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fredhat-cluster-oids" height="61" width="51" /></a></div><p>Following on from the python bindings post I found myself with a real problem,</p>
<p>the netsnmp bindings I could not for the life of me get to take the redhat cluste MIB files, so what did that leave me with, walking the entire parent cluster OID, manually matching the returned OID&#8217;s to their MIB names based on the value returned as I couldn&#8217;t find a decent mib browser or script to convert them &#8230;</p>
<p>At any rate here is a subset of OID&#8217;s for polling the redhat cluster service using snmp, please note that are more OID&#8217;s but these vary on your cluster config.</p>
<p>Python code:</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rhc_oid = <span style="color: #483d8b;">'.1.3.6.1.4.1.2312.8'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; data_oids = <span style="color: black;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcMIBVersion'</span>:<span style="color: #483d8b;">'.1.1'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterName'</span>:<span style="color: #483d8b;">'.2.1'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterStatusCode'</span>:<span style="color: #483d8b;">'.2.2'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterStatusDesc'</span>:<span style="color: #483d8b;">'.2.3'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterVotesNeededForQuorum'</span>:<span style="color: #483d8b;">'.2.4'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterVotes'</span>:<span style="color: #483d8b;">'.2.5'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterQuorate'</span>:<span style="color: #483d8b;">'.2.6'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterNodesNum'</span>:<span style="color: #483d8b;">'.2.7'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterNodesNames'</span>:<span style="color: #483d8b;">'.2.8'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterAvailNodesNum'</span>:<span style="color: #483d8b;">'.2.9'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterAvailNodesNames'</span>:<span style="color: #483d8b;">'.2.10'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterUnavailNodesNum'</span>:<span style="color: #483d8b;">'.2.11'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterUnavailNodesNames'</span>:<span style="color: #483d8b;">'.2.12'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterServicesNum'</span>:<span style="color: #483d8b;">'.2.13'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterServicesNames'</span>:<span style="color: #483d8b;">'.2.14'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterRunningServicesNum'</span>:<span style="color: #483d8b;">'.2.15'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterRunningServicesNames'</span>:<span style="color: #483d8b;">'.2.16'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterStoppedServicesNum'</span>:<span style="color: #483d8b;">'.2.17'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterStoppedServicesNames'</span>:<span style="color: #483d8b;">'.2.18'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterFailedServicesNum'</span>:<span style="color: #483d8b;">'.2.19'</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">'rhcClusterFailedServicesNames'</span>:<span style="color: #483d8b;">'.2.20'</span><span style="color: black;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> item <span style="color: #ff7700;font-weight:bold;">in</span> data_oids:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oid = <span style="color: #483d8b;">'%s%s'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>rhc_oid,data_oids<span style="color: black;">&#91;</span>item<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> item,oid</div></td></tr></tbody></table></div>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fredhat-cluster-oids';
  addthis_title  = 'RedHat+Cluster+OID%26%238217%3Bs';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/linux/redhat-cluster-oids/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>net-snmp python bindings</title>
		<link>http://www.saiweb.co.uk/python/net-snmp-python-bindings</link>
		<comments>http://www.saiweb.co.uk/python/net-snmp-python-bindings#comments</comments>
		<pubDate>Wed, 03 Mar 2010 14:26:09 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[bindings]]></category>
		<category><![CDATA[net-snmp]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=833</guid>
		<description><![CDATA[Having spent a few hours trying to get this working on CentOS 5.4 x64 I am posting this blog entry for others to reference:
Download and complie net-snmp >= 5.4.2.1 http://net-snmp.sourceforge.net/
12345./configure --with-python-modules
make &#38;&#38; make install
cd /path/to/net-snmp-src/python/
python ./setup.py build
python ./setup.py test
You may get ImportError: libnetsnmp.so.20, this is due to x64 build creating as /usr/lib64/libnetsnmp.so.10
12ln -s /usr/lib64/libnetsnmp.so.10.0.3 /usr/lib64/libnetsnmp.so.20
python [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fpython%2Fnet-snmp-python-bindings"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fpython%2Fnet-snmp-python-bindings" height="61" width="51" /></a></div><p>Having spent a few hours trying to get this working on CentOS 5.4 x64 I am posting this blog entry for others to reference:</p>
<p>Download and complie net-snmp >= 5.4.2.1 <a href="http://net-snmp.sourceforge.net/">http://net-snmp.sourceforge.net/</a></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-python-modules</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>net-snmp-src<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span><br />
python .<span style="color: #000000; font-weight: bold;">/</span>setup.py build<br />
python .<span style="color: #000000; font-weight: bold;">/</span>setup.py <span style="color: #7a0874; font-weight: bold;">test</span></div></td></tr></tbody></table></div>
<p>You may get ImportError: libnetsnmp.so.20, this is due to x64 build creating as /usr/lib64/libnetsnmp.so.10</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnetsnmp.so.10.0.3 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnetsnmp.so.20<br />
python .<span style="color: #000000; font-weight: bold;">/</span>setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<p>And you are done, you can now use the netsnmp python bindings, I&#8217;d recomend seeing the examples here: <a href="http://www.ibm.com/developerworks/aix/library/au-netsnmpnipython/">http://www.ibm.com/developerworks/aix/library/au-netsnmpnipython/</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Fpython%2Fnet-snmp-python-bindings';
  addthis_title  = 'net-snmp+python+bindings';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/python/net-snmp-python-bindings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All quiet on the front &#8230;.</title>
		<link>http://www.saiweb.co.uk/general/all-quiet-on-the-front</link>
		<comments>http://www.saiweb.co.uk/general/all-quiet-on-the-front#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:45:52 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[flowplayer]]></category>
		<category><![CDATA[froomi]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=830</guid>
		<description><![CDATA[No I have not faded into cyber oblivion, things have just been way to busy on the work front to post any updates.
Such is the case with project deadlines, and frankly I&#8217;d rather be rushed off my feet than unemployed at the moment  
That said I do have a few projects in the works [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fgeneral%2Fall-quiet-on-the-front"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fgeneral%2Fall-quiet-on-the-front" height="61" width="51" /></a></div><p>No I have not faded into cyber oblivion, things have just been way to busy on the work front to post any updates.</p>
<p>Such is the case with project deadlines, and frankly I&#8217;d rather be rushed off my feet than unemployed at the moment <img src='http://www.saiweb.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>That said I do have a few projects in the works first and foremost is the Wordpress-Flowplayer 2.1.0.0 release,</p>
<ol>
<li>I have secured the latest version of flowplayer courtesy of the guys over at <a href="http://flowplayer.org">flowplayer.org</a>,</li>
<li>I am working on integrating the <a href="http://mediamelon.com">mediamelon</a> CDN service, which will be bundled with 2.1.0.0</li>
<li>With any luck provided I can get the code right this will also allow the use of 3rd party plugins</li>
<li>Working on an advance &#8217;scripting&#8217; area to allow you to embed your own syntax in the plugin hook.</li>
</ol>
<p>I am also redeveloping Froomi at present to add in some additional features, which will be served using a RESTful API, more on that soon,</p>
<p>Lastly there will be a new blog appearing soon geared mainly toward security and pen testing, following a nickname I have now picked up from work &#8216;the sith admin&#8217; I&#8217;ve registered an appropriate domain and will be setting up on there soon.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Fgeneral%2Fall-quiet-on-the-front';
  addthis_title  = 'All+quiet+on+the+front+%26%238230%3B.';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/general/all-quiet-on-the-front/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress Flowplayer subject of a study</title>
		<link>http://www.saiweb.co.uk/uncategorized/wordpress-flowplayer-subject-of-a-study</link>
		<comments>http://www.saiweb.co.uk/uncategorized/wordpress-flowplayer-subject-of-a-study#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:40:02 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=824</guid>
		<description><![CDATA[I was a bit taken back today after stumbling across this pdf by Dr. Wolf-Fritz Riekert http://share.ieservices.de/downloads/documents/Wordpress_Flowplayer_Plugin_pash-m_recent_version.pdf

Google translated version
Seems my plugin and the code therein has been the subject of a study, after perusing the google translation of the document I can see some very interesting concepts on how to improve the plugins integration with [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fwordpress-flowplayer-subject-of-a-study"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fwordpress-flowplayer-subject-of-a-study" height="61" width="51" /></a></div><p>I was a bit taken back today after stumbling across this pdf by Dr. Wolf-Fritz Riekert <a href="http://share.ieservices.de/downloads/documents/Wordpress_Flowplayer_Plugin_pash-m_recent_version.pdf">http://share.ieservices.de/downloads/documents/Wordpress_Flowplayer_Plugin_pash-m_recent_version.pdf</a></p>
<p><a href="http://translate.google.co.uk/translate?hl=en&#038;sl=de&#038;u=http://share.ieservices.de/downloads/documents/Wordpress_Flowplayer_Plugin_pash-m_recent_version.pdf&#038;ei=EqtqS5qpI8mPjAeyq-3MBw&#038;sa=X&#038;oi=translate&#038;ct=result&#038;resnum=5&#038;ved=0CBwQ7gEwBDgK&#038;prev=/search%3Fq%3Dd.busby%2540saiweb.co.uk%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26hs%3DeTf%26sa%3DN%26start%3D10"><br />
Google translated version</a></p>
<p>Seems my plugin and the code therein has been the subject of a study, after perusing the google translation of the document I can see some very interesting concepts on how to improve the plugins integration with wordpress itself, I have sent an email Dr. Wolf-Fritz Riekert, asking if I can take his concepts and apply them to my code, so have a read and check back for version 2.1.0.0 soon, </p>
<p>Also of note the authors at <a href="http://Flowplayer.org">Flowplayer.org</a> have also granted me permission to use the latest verison of flowplayer, this will be rolled into 2.1.0.0</p>
<p>Remember to request features please use my <a href="http://trac.saiweb.co.uk/saiweb/">Trac system</a>.</p>
<p><strong>Update:</strong>Dr. Wolf-Fritz Riekert has gotten back to me, this study is in fact the work of a group of students, the project leader of which was Martin Wörz, of <a href="http://ieservices.de">ieservices.de</a>, I&#8217;ll be liaising with him over the concepts in the study.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fwordpress-flowplayer-subject-of-a-study';
  addthis_title  = 'Wordpress+Flowplayer+subject+of+a+study';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/uncategorized/wordpress-flowplayer-subject-of-a-study/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>/bin/sh: bad interpreter</title>
		<link>http://www.saiweb.co.uk/uncategorized/bin-sh-bad-interpreter</link>
		<comments>http://www.saiweb.co.uk/uncategorized/bin-sh-bad-interpreter#comments</comments>
		<pubDate>Mon, 01 Feb 2010 11:41:58 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bad]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=816</guid>
		<description><![CDATA[For security newer distros of RHEL and their derivatives an mounting /tmp with the noexec option.
Now if you have ever had to clean up a compromised web app you can see why this makes a lot of sense, and if not here&#8217;s a quick example.
Yours/Clients web app becomes compromised, running kernel has a buffer overflow [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fbin-sh-bad-interpreter"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fbin-sh-bad-interpreter" height="61" width="51" /></a></div><p>For security newer distros of RHEL and their derivatives an mounting /tmp with the noexec option.</p>
<p>Now if you have ever had to clean up a compromised web app you can see why this makes a lot of sense, and if not here&#8217;s a quick example.</p>
<p>Yours/Clients web app becomes compromised, running kernel has a buffer overflow that can lead to privilege escalation, attack writes out their code and compiles in /tmp, then runs said app from /tmp creating a pseudo root level shell, aka you&#8217;ve just been root kitted.</p>
<p>However there are legitimate reasons for using /tmp to compile, well I say legitimate, what I in fact mean is things like pecl, which you use to install extensions like APC require this &#8230;</p>
<p>workaround:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TMPDIR</span>=<span style="color: #ff0000;">'/a/paTh/your/user/can/write/to'</span></div></td></tr></tbody></table></div>
<p>Failing that:</p>
<p><strong>service httpd stop</strong></p>
<p><strong>DO NOT ALLOW ANY WEBAPP ACCESS WHILE NOEXEC IS IN USE!</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mount</span> -o,remount,rw,<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<br />
pecl <span style="color: #c20cb9; font-weight: bold;">install</span> apc<br />
<span style="color: #c20cb9; font-weight: bold;">mount</span> -o,remount,rw,noexec <span style="color: #000000; font-weight: bold;">/</span>tmp</div></td></tr></tbody></table></div>
<p><strong>DO NOT REMOVE THE NOEXEC OPTION IN /ETC/FSTAB PERMANENTLY YOU WILL REGRET DOING SO</strong></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fbin-sh-bad-interpreter';
  addthis_title  = '%2Fbin%2Fsh%3A+bad+interpreter';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/uncategorized/bin-sh-bad-interpreter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2.2.3 dual extention vulnerability</title>
		<link>http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability</link>
		<comments>http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability#comments</comments>
		<pubDate>Tue, 05 Jan 2010 11:33:17 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[537535]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[dual extension]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=802</guid>
		<description><![CDATA[Redhat bug 537535
Take for instance this code saved as test.php.png
123&#60;?PHP
print_r&#40;$_POST&#41;;
?&#62;
Low and behold this will render out the entire post array! and will interpret the php itself, now lets be clear here the proper use of selinux and directory structures to prevent UGC from being allowed to be access directly and / or run arbitrary code [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fapache-2-2-3-dual-extention-vulnerability"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fapache-2-2-3-dual-extention-vulnerability" height="61" width="51" /></a></div><p><a href="https://bugzilla.redhat.com/show_bug.cgi?id=537535">Redhat bug 537535</a></p>
<p>Take for instance this code saved as test.php.png</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?PHP</span><br />
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Low and behold this will render out the entire post array! and will interpret the php itself, now lets be clear here the proper use of selinux and directory structures to prevent UGC from being allowed to be access directly and / or run arbitrary code would of prevented this, however as is often the case the setup is such that the preventative conditions could not / are not deployed.</p>
<p>At any rate this bug comes courtesy of the apache AddHandler directive,</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddHandler x-httpd-php .php</div></td></tr></tbody></table></div>
<p>The statement above seems to &#8216;loose&#8217; match the .php extension meaning a file simply only contain .php anywhere in it&#8217;s filename to be interpreted as PHP.</p>
<p>The suggested work around for this is as follows:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#Workaround for bug here: https://bugzilla.redhat.com/show_bug.cgi?id=537535</span><br />
<span style="color: #000000; font-weight: bold;">&lt;</span>FilesMatch \.php$<span style="color: #000000; font-weight: bold;">&gt;</span><br />
SetHandler x-httpd-php<br />
ForceType text<span style="color: #000000; font-weight: bold;">/</span>html<br />
<span style="color: #000000; font-weight: bold;">&lt;/</span>FilesMatch<span style="color: #000000; font-weight: bold;">&gt;</span></div></td></tr></tbody></table></div>
<p>Note this does not effect the AddType directive, after testing on the same version using:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php</div></td></tr></tbody></table></div>
<p>Is not effected by this &#8216;bug&#8217;.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fapache-2-2-3-dual-extention-vulnerability';
  addthis_title  = 'Apache+2.2.3+dual+extention+vulnerability';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple measures to a faster PHP app &#8211; Part 1 Double Quotes</title>
		<link>http://www.saiweb.co.uk/php/simple-measures-to-a-faster-php-app-part-1-double-quotes</link>
		<comments>http://www.saiweb.co.uk/php/simple-measures-to-a-faster-php-app-part-1-double-quotes#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:25:06 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=796</guid>
		<description><![CDATA[In some situations using a double quotes string is required i.e. &#8220;this\nstring\nappears\over\nmany\nlines&#8221; &#8230;
However in 99% of cases it is used without even thing about in implications of doing so &#8230; PHP will infact evaluate any string wrapped in double quotes, this adds a processing overhead, but it seems people do not actually reliase how much [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fsimple-measures-to-a-faster-php-app-part-1-double-quotes"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fsimple-measures-to-a-faster-php-app-part-1-double-quotes" height="61" width="51" /></a></div><p>In some situations using a double quotes string is required i.e. &#8220;this\nstring\nappears\over\nmany\nlines&#8221; &#8230;</p>
<p>However in 99% of cases it is used without even thing about in implications of doing so &#8230; PHP will infact evaluate any string wrapped in double quotes, this adds a processing overhead, but it seems people do not actually reliase how much in comparrison to using single quotes for the same string.</p>
<p>Take for example this code:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?PHP</span><br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* double-quotes-are-bad.php ~ D.Busby (Saiweb.co.uk)<br />
&nbsp;**/</span><br />
<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$var</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;This is a stiring it may not actually have anything to be parse within&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&quot; However the issue remains that infact php will attempt to evaluate every char&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&quot; In this string, which in this example may not be so bad, as it's just one string&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&quot; In one file, buit imagine what happens when every string in your webapp uses double quotes&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$end</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$len</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/round"><span style="color: #990000;">round</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$end</span><span style="color: #339933;">-</span><span style="color: #000088;">$start</span><span style="color: #339933;">,</span>10<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$len</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Chars evaluated in '</span><span style="color: #339933;">.</span><span style="color: #000088;">$res</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' seconds'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$var</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'This is a stiring it may not actually have anything to be parse within'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">' However the issue remains that infact php will attempt to evaluate every char'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">' In this string, which in this example may not be so bad, as it\'s just one string'</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">.</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">' In one file, buit imagine what happens when every string in your webapp uses double quotes'</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$end</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/microtime"><span style="color: #990000;">microtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$len</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$res2</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/round"><span style="color: #990000;">round</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$end</span><span style="color: #339933;">-</span><span style="color: #000088;">$start</span><span style="color: #339933;">,</span>10<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$len</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Chars evaluated in '</span><span style="color: #339933;">.</span><span style="color: #000088;">$res2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' seconds'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$speed</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/round"><span style="color: #990000;">round</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>1 <span style="color: #339933;">-</span> <span style="color: #000088;">$res2</span><span style="color: #339933;">/</span><span style="color: #000088;">$res</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> 100<span style="color: #339933;">,</span>2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Single quotes are '</span><span style="color: #339933;">.</span><span style="color: #000088;">$speed</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'% faster'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Now I am running this on a live server, that is serving in excess of 100 pages a second, take a look at the output:</p>
<p>320 Chars evaluated in 1.40667E-5 seconds<br />
320 Chars evaluated in 3.0994E-6 seconds<br />
Single quotes are 77.97% faster</p>
<p>320 Chars evaluated in 1.28746E-5 seconds<br />
320 Chars evaluated in 3.0994E-6 seconds<br />
Single quotes are 75.93% faster</p>
<p>320 Chars evaluated in 1.3113E-5 seconds<br />
320 Chars evaluated in 2.1458E-6 seconds<br />
Single quotes are 83.64% faster</p>
<p>320 Chars evaluated in 1.19209E-5 seconds<br />
320 Chars evaluated in 2.861E-6 seconds<br />
Single quotes are 76% faster</p>
<p>320 Chars evaluated in 1.3113E-5 seconds<br />
320 Chars evaluated in 2.861E-6 seconds<br />
Single quotes are 78.18% faster</p>
<p>320 Chars evaluated in 1.3113E-5 seconds<br />
320 Chars evaluated in 2.861E-6 seconds<br />
Single quotes are 78.18% faster</p>
<p>The improvement is consistently in excess of 75%, so the moral of the story? don&#8217;t use &#8220;&#8221; if you do not need to!</p>
<p>Thanks to everyone along the way who&#8217;ve discussed and proven development methods along the way with me, and sorry it&#8217;s taken so long to get them written up.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fsimple-measures-to-a-faster-php-app-part-1-double-quotes';
  addthis_title  = 'Simple+measures+to+a+faster+PHP+app+%26%238211%3B+Part+1+Double+Quotes';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/php/simple-measures-to-a-faster-php-app-part-1-double-quotes/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Call to undefined function imagettfbbox()</title>
		<link>http://www.saiweb.co.uk/php/call-to-undefined-function-imagettfbbox</link>
		<comments>http://www.saiweb.co.uk/php/call-to-undefined-function-imagettfbbox#comments</comments>
		<pubDate>Tue, 13 Oct 2009 13:19:20 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=791</guid>
		<description><![CDATA[Call to undefined function imagettfbbox()
Either you do not have php GD installed (check your phpinfo(); and see if GD has laoded with TTF support)
Or if you are compiling from source add: &#8211;with-gd  &#8211;with-freetype-dir=/lib64 &#8211;with-ttf=/lib64 &#8211;enable-gd-native-ttf
 to your configure line.
Note: you&#8217;ll need gd-devel and freetype-devel libs installed, and im using /lib64 as im running a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fcall-to-undefined-function-imagettfbbox"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fcall-to-undefined-function-imagettfbbox" height="61" width="51" /></a></div><p><strong>Call to undefined function imagettfbbox()</strong></p>
<p>Either you do not have php GD installed (check your phpinfo(); and see if GD has laoded with TTF support)</p>
<p>Or if you are compiling from source add: &#8211;with-gd  &#8211;with-freetype-dir=/lib64 &#8211;with-ttf=/lib64 &#8211;enable-gd-native-ttf</p>
<p> to your configure line.</p>
<p>Note: you&#8217;ll need gd-devel and freetype-devel libs installed, and im using /lib64 as im running a 64bit OS.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fcall-to-undefined-function-imagettfbbox';
  addthis_title  = 'Call+to+undefined+function+imagettfbbox%28%29';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/php/call-to-undefined-function-imagettfbbox/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux – Generating file manifests and then checking them &#8211; Improved</title>
		<link>http://www.saiweb.co.uk/linux/linux-%e2%80%93-generating-file-manifests-and-then-checking-them-improved</link>
		<comments>http://www.saiweb.co.uk/linux/linux-%e2%80%93-generating-file-manifests-and-then-checking-them-improved#comments</comments>
		<pubDate>Tue, 29 Sep 2009 14:14:06 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[indication]]></category>
		<category><![CDATA[indicator]]></category>
		<category><![CDATA[manifest]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=788</guid>
		<description><![CDATA[Following on from Linux – Generating file manifests and then checking them I was always getting the same questions &#8230;
How long left on the manifest Buzz ?
How long left on the verification Buzz ?
And I HATE having to turn around an say &#8230; I don&#8217;t know &#8230;
The problem with the usual command line method is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Flinux-%25e2%2580%2593-generating-file-manifests-and-then-checking-them-improved"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Flinux-%25e2%2580%2593-generating-file-manifests-and-then-checking-them-improved" height="61" width="51" /></a></div><p>Following on from <a href="http://www.saiweb.co.uk/linux/linux-generating-file-manifests-and-then-checking-them">Linux – Generating file manifests and then checking them</a> I was always getting the same questions &#8230;</p>
<p>How long left on the manifest Buzz ?<br />
How long left on the verification Buzz ?</p>
<p>And I <strong>HATE</strong> having to turn around an say &#8230; I don&#8217;t know &#8230;</p>
<p>The problem with the usual command line method is that it give no indication of progress, and by extension no indication that it was infact running and not &#8216;hung&#8217; &#8230;</p>
<p>As such I have now added the &#8216;manifest&#8217; command set to the <a href="http://www.saiweb.co.uk/sysadmin">Sysadmin toolset</a></p>
<p>The manifest command take two data types, the first is a folder path from which to build the file manifest from, the manifest itself is also compatible with the &#8220;md5sum &#8211;check&#8221; function.</p>
<p><div id="saiweb_12d8b885dfdd8d35d60c39f1506e5984" style="width:900px; height:300px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_12d8b885dfdd8d35d60c39f1506e5984", "http://www.saiweb.co.uk/wp-content/plugins/word-press-flow-player/flowplayer/gpl/flowplayer-3.1.1.swf", {
				plugins: {
  					 controls: {    					
      					buttonOverColor: '',
      					sliderColor: '',
      					bufferColor: '',
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					durationColor: '',
      					progressColor: '',
      					backgroundColor: '',
      					timeColor: '',
      					buttonColor: '',
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					url:'http://content.screencast.com/users/D.Busby/folders/Jing/media/dd41bc92-17d3-4c34-8d46-80188f13aff2/00000337.mp4',
					autoPlay: false,
       				autoBuffering: false
				},
		logo: {  
        url: 'http://trac.saiweb.co.uk/saiweb/chrome/site/buzz.jpg',  
        displayTime: 0,
        fullscreenOnly: false,
        linkUrl: 'http://saiweb.co.uk' 
    },
				canvas: {
					backgroundColor:''
				}})
			});</script>
				</p>
<p>The second is the path to the manifest itself, in this case the manifest command will verify each file against it&#8217;s entry in the manifest:</p>
<p><div id="saiweb_57177f70a52a8a72cd38ccfa507a2082" style="width:900px; height:300px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_57177f70a52a8a72cd38ccfa507a2082", "http://www.saiweb.co.uk/wp-content/plugins/word-press-flow-player/flowplayer/gpl/flowplayer-3.1.1.swf", {
				plugins: {
  					 controls: {    					
      					buttonOverColor: '',
      					sliderColor: '',
      					bufferColor: '',
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					durationColor: '',
      					progressColor: '',
      					backgroundColor: '',
      					timeColor: '',
      					buttonColor: '',
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					url:'http://content.screencast.com/users/D.Busby/folders/Jing/media/2d3eb196-87ef-4464-982b-5b9481c000fe/00000338.mp4',
					autoPlay: false,
       				autoBuffering: false
				},
		logo: {  
        url: 'http://trac.saiweb.co.uk/saiweb/chrome/site/buzz.jpg',  
        displayTime: 0,
        fullscreenOnly: false,
        linkUrl: 'http://saiweb.co.uk' 
    },
				canvas: {
					backgroundColor:''
				}})
			});</script>
				</p>
<p>At each point the command give you an indication of it&#8217;s current status, however this does come at a small cost, the script has no concept of the size of you console and as such will always render out the same number of character meaning if you console is not wide enough it will not render correctly, in the videos I have the console on a high resolution monitor as can be seen each video itself is 900 pixels wide.</p>
<p>This process is CPU intensive (20-45% on one core of a intel core2duo 2.8GHZ) and uses around 140KB of memory.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Flinux-%25e2%2580%2593-generating-file-manifests-and-then-checking-them-improved';
  addthis_title  = 'Linux+%E2%80%93+Generating+file+manifests+and+then+checking+them+%26%238211%3B+Improved';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/linux/linux-%e2%80%93-generating-file-manifests-and-then-checking-them-improved/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://content.screencast.com/users/D.Busby/folders/Jing/media/dd41bc92-17d3-4c34-8d46-80188f13aff2/00000337.mp4" length="6951906" type="video/mp4" />
<enclosure url="http://content.screencast.com/users/D.Busby/folders/Jing/media/2d3eb196-87ef-4464-982b-5b9481c000fe/00000338.mp4" length="7847114" type="video/mp4" />
		</item>
		<item>
		<title>Sysamin &#8211; iconv update</title>
		<link>http://www.saiweb.co.uk/linux/sysamin-iconv-update</link>
		<comments>http://www.saiweb.co.uk/linux/sysamin-iconv-update#comments</comments>
		<pubDate>Thu, 10 Sep 2009 10:40:59 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[BOM]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=777</guid>
		<description><![CDATA[I had a major issue facing the iconv functionality of the sysadmin toolset namely due to rushed coding.
When loading a file to be re-encoded the entire file was loaded into the buffer, encoded as whole and written out to the new file, this of course meant the  memory usage was roughly double the size of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fsysamin-iconv-update"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fsysamin-iconv-update" height="61" width="51" /></a></div><p>I had a major issue facing the iconv functionality of the <a href="http://www.saiweb.co.uk/sysadmin">sysadmin toolset</a> namely due to rushed coding.</p>
<p>When loading a file to be re-encoded the entire file was loaded into the buffer, encoded as whole and written out to the new file, this of course meant the  memory usage was roughly double the size of the file to be converted plus any overheads to do with the encoding itself.</p>
<p>Today I had need to convert a 1.3GB sql file, needles to say the script was crashing out with a memory error.</p>
<p>As such I have now completely re-written the function it now processes the file in 1kb &#8216;chunks&#8217;, moving the load to the CPU, this process is now very cpu intensive the the memory overhead is minimal (during test processed the 1.3GB file using 113kb of memory!!!).</p>
<p><div id="saiweb_a41a49549ded55aa13545bd54887524f" style="width:487px; height:417px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_a41a49549ded55aa13545bd54887524f", "http://www.saiweb.co.uk/wp-content/plugins/word-press-flow-player/flowplayer/gpl/flowplayer-3.1.1.swf", {
				plugins: {
  					 controls: {    					
      					buttonOverColor: '',
      					sliderColor: '',
      					bufferColor: '',
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					durationColor: '',
      					progressColor: '',
      					backgroundColor: '',
      					timeColor: '',
      					buttonColor: '',
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					url:'http://www.saiweb.co.uk/wp-content/uploads/2009/09/sysadmin-iconv.mp4',
					autoPlay: false,
       				autoBuffering: false
				},
		logo: {  
        url: 'http://trac.saiweb.co.uk/saiweb/chrome/site/buzz.jpg',  
        displayTime: 0,
        fullscreenOnly: false,
        linkUrl: 'http://saiweb.co.uk' 
    },
				canvas: {
					backgroundColor:''
				}})
			});</script>
				</p>
<p>Also I have now added BOM (Byte order mark) detection:</p>
<p><div id="saiweb_c9b160dc557fc11d89db04ff6edaf6d8" style="width:515px; height:473px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_c9b160dc557fc11d89db04ff6edaf6d8", "http://www.saiweb.co.uk/wp-content/plugins/word-press-flow-player/flowplayer/gpl/flowplayer-3.1.1.swf", {
				plugins: {
  					 controls: {    					
      					buttonOverColor: '',
      					sliderColor: '',
      					bufferColor: '',
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					durationColor: '',
      					progressColor: '',
      					backgroundColor: '',
      					timeColor: '',
      					buttonColor: '',
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					url:'http://www.saiweb.co.uk/wp-content/uploads/2009/09/sysadmin_oconv_bom.mp4',
					autoPlay: false,
       				autoBuffering: false
				},
		logo: {  
        url: 'http://trac.saiweb.co.uk/saiweb/chrome/site/buzz.jpg',  
        displayTime: 0,
        fullscreenOnly: false,
        linkUrl: 'http://saiweb.co.uk' 
    },
				canvas: {
					backgroundColor:''
				}})
			});</script>
				</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fsysamin-iconv-update';
  addthis_title  = 'Sysamin+%26%238211%3B+iconv+update';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/linux/sysamin-iconv-update/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
