<?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 &#187; php</title>
	<atom:link href="http://www.saiweb.co.uk/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saiweb.co.uk</link>
	<description>Ramblings of a Sys admin</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:57:49 +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>php mail() &#8211; Making it not suck using sendmail</title>
		<link>http://www.saiweb.co.uk/linux/php-mail-making-it-not-suck-using-sendmail</link>
		<comments>http://www.saiweb.co.uk/linux/php-mail-making-it-not-suck-using-sendmail#comments</comments>
		<pubDate>Sun, 18 Sep 2011 12:22:46 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1118</guid>
		<description><![CDATA[Ok ok &#8230; as some of the people work with are aware, I did this months ago fro one project, ment to blog and document it then in fact I have a draft post last modified 06/05/2011 covering full spam score reduction, and half finished instructions on setting up a mail relay &#8230; so in [...]]]></description>
			<content:encoded><![CDATA[<p>Ok ok &#8230; as some of the people work with are aware, I did this months ago fro one project, ment to blog and document it then in fact I have a draft post last modified 06/05/2011 covering full spam score reduction, and half finished instructions on setting up a mail relay &#8230; so in the interim of finishing that post I&#8217;m going to cover improving user experience through proper php configuration.</p>
<p>Out of the box, php will use sendmail, and it will do so as follows.</p>
<ol>
<li>mail() forks sendmail process</li>
<li>sendmail attempts to send email to destination server</li>
<li>sendmail returns on send complete</li>
</ol>
<div>Generally this isn&#8217;t a problem but what if at point 2. there is an issue with the destination MTA ? well in that case php will infact sit around waiting fot sendmail to complete, leaving your user with a hung screen / hung ajax call.</div>
<div>So what to do?</div>
<div>Simply put you want to offset the sending email process you do not want the end user sat around waiting for sendmail to finish sending the email, but you do want the email to send &#8230; decisions &#8230; decisions.</div>
<div>So edit yout php.ini .</div>
<div class="codecolorer-container text 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="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sendmail_path = /usr/sbin/sendmail -t -i -O DeliveryMode=b</div></td></tr></tbody></table></div>
<p>This sets the delivery mode to background, sendmail will return to php near instantly and send the email in the background by placing in into a queue.</p>
<p>TL;DR</p>
<p>Put the above in your php.ini to not hang around to sendmail, and hav it return instantly.<br />
<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/linux/php-mail-making-it-not-suck-using-sendmail" data-text="php mail() &#8211; Making it not suck using sendmail" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fphp-mail-making-it-not-suck-using-sendmail&#038;text=php%20mail%28%29%20%26%238211%3B%20Making%20it%20not%20suck%20using%20sendmail" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/linux/php-mail-making-it-not-suck-using-sendmail/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &amp; Caching an in depth review &#8211; Follow up using Varnish</title>
		<link>http://www.saiweb.co.uk/php/php-caching-an-in-depth-review-follow-up-using-varnish</link>
		<comments>http://www.saiweb.co.uk/php/php-caching-an-in-depth-review-follow-up-using-varnish#comments</comments>
		<pubDate>Wed, 10 Aug 2011 20:59:26 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1069</guid>
		<description><![CDATA[Ok, so following up on PHP &#038; Caching with Varnish, let&#8217;s cut to the hard facts shall we? Using the same tests as ab -c 100 -n 500 -g ./saiweb-nocache-nogzip.bpl http://www.saiweb.co.uk/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.saiweb.co.uk (be patient) [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so following up on PHP &#038; Caching with Varnish, let&#8217;s cut to the hard facts shall we?</p>
<p>Using the same tests as <a href="http://www.saiweb.co.uk/hosting/php-caching-an-in-depth-review" title="PHP &#038; Caching an in depth review"></a></p>
<p> ab -c 100 -n 500 -g ./saiweb-nocache-nogzip.bpl http://www.saiweb.co.uk/<br />
This is ApacheBench, Version 2.3 <$Revision: 655654 $><br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br />
Licensed to The Apache Software Foundation, http://www.apache.org/</p>
<p>Benchmarking www.saiweb.co.uk (be patient)<br />
Completed 100 requests<br />
Completed 200 requests<br />
Completed 300 requests<br />
Completed 400 requests<br />
Completed 500 requests<br />
Finished 500 requests</p>
<p>Server Software:        Apache<br />
Server Hostname:        www.saiweb.co.uk<br />
Server Port:            80</p>
<p>Document Path:          /<br />
Document Length:        92719 bytes</p>
<p>Concurrency Level:      100<br />
Time taken for tests:   0.184 seconds<br />
Complete requests:      500<br />
Failed requests:        0<br />
Write errors:           0<br />
Total transferred:      47597095 bytes<br />
HTML transferred:       47379409 bytes<br />
Requests per second:    2716.92 [#/sec] (mean)<br />
Time per request:       36.806 [ms] (mean)<br />
Time per request:       0.368 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          252573.13 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        1    4   1.1      4       6<br />
Processing:     9   31   7.0     32      47<br />
Waiting:        2    7   5.7      4      26<br />
Total:         15   35   6.8     36      53</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%     36<br />
  66%     38<br />
  75%     39<br />
  80%     39<br />
  90%     41<br />
  95%     44<br />
  98%     48<br />
  99%     51<br />
 100%     53 (longest request)</p>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2011/08/Out.png"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2011/08/Out.png" alt="ab -c 100 -n 500 -g ./saiweb-nocache-nogzip.bpl http://www.saiweb.co.uk/" title="ab -c 100 -n 500 -g ./saiweb-nocache-nogzip.bpl http://www.saiweb.co.uk/" width="640" height="480" class="aligncenter size-full wp-image-1070" /></a></p>
<p>2716.92 requests per second with a server load average of 0.1, and in this case varnish is serving cache from disk.</p>
<p>Caching using varnish (Or even nginx / mod_cache) means that PHP does not get executed at all, the cache system grabs the cache content and serves it.</p>
<p>This of course has the benefit of reducing the CPU and memory resources needed for the running of your application, but it does have some caveats.</p>
<ul>
<li>This only works for GET requests, and content not reliant on Cookies (Truely dynamic content will not cache)</li>
<li>But on the &#8220;flipside&#8221; Varnish supports ESI, which when setup correctly you can target the dynamic sections of a pag for &#8220;passthrough&#8221; and have the rest cached</li>
<ol>
<p>More details to come, as I have time to add them I have have a lot of posts to make on boxgrinder, KVM, libvirtd etc.<br />
<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/php/php-caching-an-in-depth-review-follow-up-using-varnish" data-text="PHP &#038; Caching an in depth review &#8211; Follow up using Varnish" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fphp-caching-an-in-depth-review-follow-up-using-varnish&#038;text=PHP%20%26%23038%3B%20Caching%20an%20in%20depth%20review%20%26%238211%3B%20Follow%20up%20using%20Varnish" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/php/php-caching-an-in-depth-review-follow-up-using-varnish/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wptouch redirection vulnerability</title>
		<link>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2</link>
		<comments>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2#comments</comments>
		<pubDate>Thu, 07 Jul 2011 12:05:52 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1043</guid>
		<description><![CDATA[In theroy this: http://www.exploit-db.com/exploits/17423/ could be used to facilitate phishing, To patch this update to 1.9.28, and apply this patch: https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch UPDATE 07072011 .9.30 does not suffer from this exploit. Tweet]]></description>
			<content:encoded><![CDATA[<p>In theroy this: <a href="http://www.exploit-db.com/exploits/17423/">http://www.exploit-db.com/exploits/17423/</a> could be used to facilitate phishing, </p>
<p>To patch this update to 1.9.28, and apply this patch: https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch</p>
<p><strong>UPDATE 07072011</strong> .9.30 does not suffer from this exploit.</p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2" data-text="wptouch redirection vulnerability" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fwptouch-redirection-vulnerability-2&#038;text=wptouch%20redirection%20vulnerability" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wptouch redirection vulnerability</title>
		<link>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability</link>
		<comments>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability#comments</comments>
		<pubDate>Tue, 21 Jun 2011 10:46:15 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[17423]]></category>
		<category><![CDATA[edb]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[wptouch]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1044</guid>
		<description><![CDATA[In theory this: http://www.exploit-db.com/exploits/17423/ could be used to facilitate phishing, To patch this update to 1.9.28, and apply this patch: https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch 123cd /path/to/blog/wp-content/plugins/wptouch/ wget https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch patch &#60; wptouch-edb17423.patch update This: http://wordpress.org/news/2011/06/passwords-reset/ causes a 1.9.29 version to be rolled out. 1.9.29 is still vulnerable to this, the patch instructions above still work for 1.9.29 Tweet]]></description>
			<content:encoded><![CDATA[<p>In theory this: <a href="http://www.exploit-db.com/exploits/17423/">http://www.exploit-db.com/exploits/17423/</a> could be used to facilitate phishing, </p>
<p>To patch this update to 1.9.28, and apply this patch: <a href="https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch">https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch<br />
</a></p>
<div class="codecolorer-container text 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="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /path/to/blog/wp-content/plugins/wptouch/<br />
wget https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch<br />
patch &lt; wptouch-edb17423.patch</div></td></tr></tbody></table></div>
<p><strong>update</strong> This: <a href="http://wordpress.org/news/2011/06/passwords-reset/">http://wordpress.org/news/2011/06/passwords-reset/</a> causes a 1.9.29 version to be rolled out.</p>
<p><strong>1.9.29 is still vulnerable to this, the patch instructions above still work for 1.9.29</strong></p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability" data-text="wptouch redirection vulnerability" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fwptouch-redirection-vulnerability&#038;text=wptouch%20redirection%20vulnerability" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dissecting the hack &#8211; packed r57shell</title>
		<link>http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell</link>
		<comments>http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell#comments</comments>
		<pubDate>Wed, 26 May 2010 12:00:46 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[dissecting]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[r57]]></category>
		<category><![CDATA[r57shell]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=869</guid>
		<description><![CDATA[Before you read any further note, I will not be including the original hack file, simply due to peoples stupidity in putting this on a production environment to play with, if you use the code you do so at your own risk, and by reading this blog entry / using the code provided you agree [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Before you read any further note, I will not be including the original hack file, simply due to peoples stupidity in putting this on a production environment to play with, if you use the code you do so at your own risk, and by reading this blog entry / using the code provided you agree to accept all liability upon yourself for your own actions. Don&#8217;t be an idiot.</strong></span></p>
<p>Around 10 days ago I came across this seemingly innocuous little file.</p>
<p>What I am going to cover in this entry is dissecting the &#8216;payload&#8217; and not so much the web app in question or methods used to compromise it,</p>
<p>Whereas I will not at this time provide the original file, I will provide you with the md5 and sha1 hashes of the file so you can check it&#8217;s not lurking on your systems:</p>
<p>md5: 9ee3e6523d154114460d320477a8665a<br />
sha1: 9c64fecea5620d70a716bbd74f6e89612a4a79c7</p>
<p>The bit we are interested in is the last line of the file:</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 /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://www.php.net/eval"><span style="color: #990000;">eval</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/gzinflate"><span style="color: #990000;">gzinflate</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/base64_decode"><span style="color: #990000;">base64_decode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DATA'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Were you to run this line you would get</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 /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://www.php.net/eval"><span style="color: #990000;">eval</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/gzinflate"><span style="color: #990000;">gzinflate</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/base64_decode"><span style="color: #990000;">base64_decode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DATA2'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/sense-this-picture-makes-none.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/sense-this-picture-makes-none-240x300.jpg" alt="" title="sense-this-picture-makes-none" width="240" height="300" class="aligncenter size-medium wp-image-870" /></a></p>
<p>Confused yet? now I can appreciate the thinking behind packing a payload to avoid detection, but in this case the payload is packed 12 times, and no before you ask I did not manually run each returned statement to find this out. </p>
<p>Enter Python-Fu:</p>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/getbritf.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/getbritf-236x300.jpg" alt="" title="getbritf" width="236" height="300" class="aligncenter size-medium wp-image-871" /></a></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 />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span><br />
<span style="color: #808080; font-style: italic;"># saiweb.co.uk payload unpack script 26/05/2010</span><br />
<span style="color: #808080; font-style: italic;"># copy the eval(gzinflate()) line to payload.raw, place in same directory as this file.</span><br />
<br />
<span style="color: #483d8b;">&quot;&quot;&quot;<br />
Copyright (C) 2010 Buzz saiweb.co.uk.co.uk<br />
<br />
&nbsp; &nbsp; This program is free software: you can redistribute it and/or modify<br />
&nbsp; &nbsp; it under the terms of the GNU General Public License as published by<br />
&nbsp; &nbsp; the Free Software Foundation, either version 3 of the License, or<br />
&nbsp; &nbsp; (at your option) any later version.<br />
<br />
&nbsp; &nbsp; This program is distributed in the hope that it will be useful,<br />
&nbsp; &nbsp; but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
&nbsp; &nbsp; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &nbsp;See the<br />
&nbsp; &nbsp; GNU General Public License for more details.<br />
<br />
&nbsp; &nbsp; You should have received a copy of the GNU General Public License<br />
&nbsp; &nbsp; along with this program. &nbsp;If not, see &lt;http://www.gnu.org/licenses/&gt;.<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Additional Terms as Per section 7<br />
<br />
&nbsp; &nbsp; Attribution:<br />
<br />
&nbsp; &nbsp; Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term ALL code must carry the original Author(s) credit in comment form.<br />
&quot;&quot;&quot;</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">base64</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">zlib</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">re</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">sys</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Running ...'</span><br />
&nbsp; &nbsp; f <span style="color: #66cc66;">=</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'payload.raw'</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; php <span style="color: #66cc66;">=</span> f.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; f.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; iteration <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">0</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'eval<span style="color: #000099; font-weight: bold;">\(</span>gzinflate<span style="color: #000099; font-weight: bold;">\(</span>base64_decode<span style="color: #000099; font-weight: bold;">\(</span><span style="color: #000099; font-weight: bold;">\'</span>'</span><span style="color: #66cc66;">,</span>php<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; iteration +<span style="color: #66cc66;">=</span> <span style="color: #ff4500;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Iteration: %d'</span> % iteration<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'eval<span style="color: #000099; font-weight: bold;">\(</span>gzinflate<span style="color: #000099; font-weight: bold;">\(</span>base64_decode<span style="color: #000099; font-weight: bold;">\(</span><span style="color: #000099; font-weight: bold;">\'</span>'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">''</span><span style="color: #66cc66;">,</span>php<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; raw <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\'</span><span style="color: #000099; font-weight: bold;">\)</span><span style="color: #000099; font-weight: bold;">\)</span><span style="color: #000099; font-weight: bold;">\)</span>;'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">''</span><span style="color: #66cc66;">,</span>raw<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; gstring <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">base64</span>.<span style="color: black;">b64decode</span><span style="color: black;">&#40;</span>raw.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; php <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">zlib</span>.<span style="color: black;">decompressobj</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">decompress</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'x<span style="color: #000099; font-weight: bold;">\x</span>9c'</span> + gstring<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#print payload</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#sys.exit()</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> php<br />
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ <span style="color: #66cc66;">==</span> <span style="color: #483d8b;">'__main__'</span>:<br />
&nbsp; &nbsp; main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>Copy the first payload lines into a file named payload.raw, take the above code and copy it into a file named dissect.py.</p>
<p>When dissect.py is run you will get the following output:</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 />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python .<span style="color: #000000; font-weight: bold;">/</span>dissect.py<br />
Running ...<br />
Iteration: <span style="color: #000000;">1</span><br />
Iteration: <span style="color: #000000;">2</span><br />
Iteration: <span style="color: #000000;">3</span><br />
Iteration: <span style="color: #000000;">4</span><br />
Iteration: <span style="color: #000000;">5</span><br />
Iteration: <span style="color: #000000;">6</span><br />
Iteration: <span style="color: #000000;">7</span><br />
Iteration: <span style="color: #000000;">8</span><br />
Iteration: <span style="color: #000000;">9</span><br />
Iteration: <span style="color: #000000;">10</span><br />
Iteration: <span style="color: #000000;">11</span><br />
Iteration: <span style="color: #000000;">12</span><br />
<span style="color: #000000; font-weight: bold;">&lt;</span>?php<br />
...</div></td></tr></tbody></table></div>
<p>As such you may want to run it using the following command:</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">python .<span style="color: #000000; font-weight: bold;">/</span>dissect.py <span style="color: #000000; font-weight: bold;">&gt;</span> r57.php</div></td></tr></tbody></table></div>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/ggwit.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/ggwit-257x300.jpg" alt="" title="ggwit" width="257" height="300" class="aligncenter size-medium wp-image-872" /></a></p>
<p>And what you will find after unpacking 12 times in total, the &#8220;payload&#8221; is the r57shell, this script is an information gathering tool and pseudo shell, meaning it will run any command on the host server that php can, providing in most cases ssh esq access to the exploited host, allowing you to do pretty much anything you wanted at this point, some of the features also include /etc/passwd /etc/shadow dumping, aswell as searching for a tirade of common file *.sql* admin* etc, it&#8217;s a one stop script for information gathering on a LAMP/WAMP based host.</p>
<p><strong><br />
Defense: modify php.ini to disable eval(), exec, shell_exec and all none essential functions.<br />
</strong></p>
<p>And of course, ensure your web apps are patched and up to date as well as the host they are running on. </p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell" data-text="Dissecting the hack &#8211; packed r57shell" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fdissecting-the-hack-r57shell&#038;text=Dissecting%20the%20hack%20%26%238211%3B%20packed%20r57shell" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell/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>
		<category><![CDATA[double quotes]]></category>
		<category><![CDATA[performance.]]></category>
		<category><![CDATA[single quotes]]></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 [...]]]></description>
			<content:encoded><![CDATA[<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><span style="color: #cc66cc;">10</span><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><span style="color: #cc66cc;">10</span><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><span style="color: #cc66cc;">1</span> <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> <span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><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>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/php/simple-measures-to-a-faster-php-app-part-1-double-quotes" data-text="Simple measures to a faster PHP app &#8211; Part 1 Double Quotes" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fsimple-measures-to-a-faster-php-app-part-1-double-quotes&#038;text=Simple%20measures%20to%20a%20faster%20PHP%20app%20%26%238211%3B%20Part%201%20Double%20Quotes" >Tweet</a></span></p>
]]></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 [...]]]></description>
			<content:encoded><![CDATA[<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.<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/php/call-to-undefined-function-imagettfbbox" data-text="Call to undefined function imagettfbbox()" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fcall-to-undefined-function-imagettfbbox&#038;text=Call%20to%20undefined%20function%20imagettfbbox%28%29" >Tweet</a></span></p>
]]></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>WordPress Flowplayer 2.0.9.9</title>
		<link>http://www.saiweb.co.uk/php/wordpress-flowplayer-2-0-9-9</link>
		<comments>http://www.saiweb.co.uk/php/wordpress-flowplayer-2-0-9-9#comments</comments>
		<pubDate>Thu, 03 Sep 2009 16:33:24 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[flowplayer]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=762</guid>
		<description><![CDATA[Finaly it is ready and in a state I am happy to release it. Features Complete code re-write, much more efficient and easier to update Flowplayer 3.1.1 License detection, will only use the commercial version if you enter a license! Playlists Better wordpress API integration, all settings now stored in wordpress no more config files! [...]]]></description>
			<content:encoded><![CDATA[<p>Finaly it is ready and in a state I am happy to release it.</p>
<p><span style="text-decoration: underline;"><strong>Features</strong></span></p>
<ul>
<li>Complete code re-write, much more efficient and easier to update</li>
<li>Flowplayer 3.1.1</li>
<li>License detection, will only use the commercial version if you enter a license!</li>
<li>Playlists</li>
<li>Better wordpress API integration, all settings now stored in wordpress no more config files!</li>
<li>Same admin interface</li>
</ul>
<p>(Videos from Apple.com)</p>
<p><div id="saiweb_0d27e37617f6bff9ecf467e74d27b685" style="width:480px; height:205px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_0d27e37617f6bff9ecf467e74d27b685", "/wp-content/plugins/wordpress-flowplayer/flowplayer/gpl/flowplayer-3.1.5.swf", {
				plugins: {
  					 controls: {    					
      					
      					
      					
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					
      					
      					backgroundColor: '#141648',
      					
      					
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					autoPlay: false,
       				autoBuffering: false
				},playlist:[
				 
				{url: 'http://movies.apple.com/movies/fox/avatar/avatar2009aug0820a-tsr_h.480.mov'},
{url: 'http://movies.apple.com/movies/independent/thehorseboy/thehorseboy_h.480.mov'},
],

				canvas: {
					backgroundColor:''
				}})
			});</script>
				<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/php/wordpress-flowplayer-2-0-9-9" data-text="WordPress Flowplayer 2.0.9.9" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fwordpress-flowplayer-2-0-9-9&#038;text=WordPress%20Flowplayer%202.0.9.9" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/php/wordpress-flowplayer-2-0-9-9/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://movies.apple.com/movies/fox/avatar/avatar2009aug0820a-tsr_h.480.mov" length="91" type="video/quicktime" />
<enclosure url="http://movies.apple.com/movies/independent/thehorseboy/thehorseboy_h.480.mov" length="80" type="video/quicktime" />
		</item>
		<item>
		<title>php mail() sh: -t command not found</title>
		<link>http://www.saiweb.co.uk/linux/php-mail-sh-t-command-not-found</link>
		<comments>http://www.saiweb.co.uk/linux/php-mail-sh-t-command-not-found#comments</comments>
		<pubDate>Fri, 03 Jul 2009 16:06:25 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=686</guid>
		<description><![CDATA[PHP mail() not working? getting &#8220;sh: -t: command not found&#8221; when testing using the cli? what you have is a missing devel package!!!! In my case sendmail-devel was missing, you&#8217;d think the configure script would alert on this but alas no, devel pack installed and one recompile later and the issue is solved. Tweet]]></description>
			<content:encoded><![CDATA[<p>PHP mail() not working?</p>
<p>getting &#8220;sh: -t: command not found&#8221; when testing using the cli?<br />
what you have is a missing devel package!!!!</p>
<p>In my case sendmail-devel was missing, you&#8217;d think the configure script would alert on this but alas no, devel pack installed and one recompile later and the issue is solved.</p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/linux/php-mail-sh-t-command-not-found" data-text="php mail() sh: -t command not found" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fphp-mail-sh-t-command-not-found&#038;text=php%20mail%28%29%20sh%3A%20-t%20command%20not%20found" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/linux/php-mail-sh-t-command-not-found/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP BUG #48139</title>
		<link>http://www.saiweb.co.uk/php/php-bug-48139</link>
		<comments>http://www.saiweb.co.uk/php/php-bug-48139#comments</comments>
		<pubDate>Tue, 05 May 2009 14:24:27 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[48139]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=652</guid>
		<description><![CDATA[Because a picture is worth over 9000 internets &#8230; apparently UPDATE: AKA &#8220;hayabusayuri&#8221; link &#8230; seriously who plays everquest? &#8230; maybe all that time playing everquest finally made the guy snap &#8230; and PHP &#038; windows &#8230; never a good combination &#8230; infact Windows and internet is a bad combination LINKY Screencap incase it is [...]]]></description>
			<content:encoded><![CDATA[<p>Because a picture is worth over 9000 internets &#8230; apparently</p>
<p><strong>UPDATE:</strong> AKA &#8220;hayabusayuri&#8221; <a href="http://209.85.229.132/search?q=cache:EDgsFNlfXkwJ:www.mmotricks.com/forums/eq2-downloads/2447-everquest-2-server-emulator-information-print.html+Beowulve%40gmail.com&#038;cd=1&#038;hl=en&#038;ct=clnk&#038;gl=uk&#038;client=firefox-a">link</a> &#8230; seriously who plays everquest? &#8230; maybe all that time playing everquest finally made the guy snap &#8230; and PHP &#038; windows &#8230; never a good combination &#8230; infact Windows and internet is a bad combination</p>
<p><a href="http://bugs.php.net/bug.php?id=48139"><br />
LINKY</a></p>
<p>Screencap incase it is removed:</p>
<p><img alt="PHP BUG 48319" src="http://farm4.static.flickr.com/3583/3503836807_d54bee036b_o.png" title="PHP BUG 48139" class="alignnone" width="460" height="744" /></p>
<p>(Thanks to the guys who forwarded me this)<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/php/php-bug-48139" data-text="PHP BUG #48139" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fphp%2Fphp-bug-48139&#038;text=PHP%20BUG%20%2348139" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/php/php-bug-48139/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 22/67 queries in 0.172 seconds using apc
Object Caching 1567/1681 objects using apc
Content Delivery Network via Rackspace Cloud Files: cdn.saiweb.co.uk

Served from: www.saiweb.co.uk @ 2012-02-08 15:27:36 -->
