<?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>Web Development &#38; Stuff &#187; Uncategorized</title>
	<atom:link href="http://web-development-blog.co.uk/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://web-development-blog.co.uk</link>
	<description>Some interesting findings from web-dev land...</description>
	<lastBuildDate>Mon, 02 Apr 2012 15:10:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP large file upload fails error code 7 (Apache)</title>
		<link>http://web-development-blog.co.uk/2011/11/08/php-large-file-upload-fails-error-code-7-apache/</link>
		<comments>http://web-development-blog.co.uk/2011/11/08/php-large-file-upload-fails-error-code-7-apache/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 09:29:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=469</guid>
		<description><![CDATA[Don&#8217;t forget kids to check the size of the tmp partition if you are having issues uploading large files with PHP.
After setting all the usual configuration directives (upload_max_filesize, post_max_size etc) uploads were still failing for me returning error code 7.
After poking around on the Debian VPS for a while I realised the /tmp partition was [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t forget kids to check the size of the tmp partition if you are having issues uploading large files with PHP.</p>
<p>After setting all the usual configuration directives (upload_max_filesize, post_max_size etc) uploads were still failing for me returning error code 7.</p>
<p>After poking around on the Debian VPS for a while I realised the /tmp partition was 128mb!!</p>
<p>Luckily you can set the path for file uploads using the following directive:</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace">upload_tmp_dir <span class="sy0">=</span> <span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>somewhere<span class="sy0">/</span>with<span class="sy0">/</span>some<span class="sy0">/</span>disk<span class="sy0">/</span>space</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2011/11/08/php-large-file-upload-fails-error-code-7-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CakePHP log() in a vendor class</title>
		<link>http://web-development-blog.co.uk/2011/07/20/using-cakephp-log-in-a-vendor-class/</link>
		<comments>http://web-development-blog.co.uk/2011/07/20/using-cakephp-log-in-a-vendor-class/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 10:48:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=452</guid>
		<description><![CDATA[The proper way to do this is with a static call to Debugger:
1Debugger::log&#40;$output&#41;;
]]></description>
			<content:encoded><![CDATA[<p>The proper way to do this is with a static call to Debugger:</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace">Debugger<span class="sy0">::</span><span class="kw3">log</span><span class="br0">&#40;</span><span class="re0">$output</span><span class="br0">&#41;</span><span class="sy0">;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2011/07/20/using-cakephp-log-in-a-vendor-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset PHP array key values</title>
		<link>http://web-development-blog.co.uk/2009/05/16/reset-php-array-key-values/</link>
		<comments>http://web-development-blog.co.uk/2009/05/16/reset-php-array-key-values/#comments</comments>
		<pubDate>Sat, 16 May 2009 11:17:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Eco friendly / green computing]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=161</guid>
		<description><![CDATA[To reset the key values in  a PHP array you can do this:
1234567891011121314151617181920212223$things = array&#40;'a','b','c','d'&#41;;
unset&#40;$things&#91;0&#93;&#41;;
print_r&#40;$things&#41;; 

#outputs
#Array
#(
# &#160; &#160;[1] =&#62; b
# &#160; &#160;[2] =&#62; c
# &#160; &#160;[3] =&#62; d
#)

# Actually do the reset.
$things = array_values&#40;$things&#41;;

print_r&#40;$things&#41;;
#outputs 
#Array
#(
# &#160; &#160;[0] =&#62; b
# &#160; &#160;[1] =&#62; c
# &#160; &#160;[2] =&#62; d
#)
]]></description>
			<content:encoded><![CDATA[<p>To reset the key values in  a PHP array you can do this:</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:100%;height:300px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><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 /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re0">$things</span> <span class="sy0">=</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st_h">'a'</span><span class="sy0">,</span><span class="st_h">'b'</span><span class="sy0">,</span><span class="st_h">'c'</span><span class="sy0">,</span><span class="st_h">'d'</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw3">unset</span><span class="br0">&#40;</span><span class="re0">$things</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw3">print_r</span><span class="br0">&#40;</span><span class="re0">$things</span><span class="br0">&#41;</span><span class="sy0">;</span> <br />
<br />
<span class="co2">#outputs</span><br />
<span class="co2">#Array</span><br />
<span class="co2">#(</span><br />
<span class="co2"># &nbsp; &nbsp;[1] =&gt; b</span><br />
<span class="co2"># &nbsp; &nbsp;[2] =&gt; c</span><br />
<span class="co2"># &nbsp; &nbsp;[3] =&gt; d</span><br />
<span class="co2">#)</span><br />
<br />
<span class="co2"># Actually do the reset.</span><br />
<span class="re0">$things</span> <span class="sy0">=</span> <span class="kw3">array_values</span><span class="br0">&#40;</span><span class="re0">$things</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="kw3">print_r</span><span class="br0">&#40;</span><span class="re0">$things</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="co2">#outputs </span><br />
<span class="co2">#Array</span><br />
<span class="co2">#(</span><br />
<span class="co2"># &nbsp; &nbsp;[0] =&gt; b</span><br />
<span class="co2"># &nbsp; &nbsp;[1] =&gt; c</span><br />
<span class="co2"># &nbsp; &nbsp;[2] =&gt; d</span><br />
<span class="co2">#)</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/05/16/reset-php-array-key-values/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mount remote file system on your local file system over SSH &#8211; SSHFS</title>
		<link>http://web-development-blog.co.uk/2009/02/25/mount-remote-file-system-on-your-local-file-system-ssh-sshfs/</link>
		<comments>http://web-development-blog.co.uk/2009/02/25/mount-remote-file-system-on-your-local-file-system-ssh-sshfs/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 23:07:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/?p=80</guid>
		<description><![CDATA[Lots of love going about today! This time, the recipient is SSHFS which allows you to mount a remote filing system onto your local tree over SSH. In a virtual hosting environment (/vhosts/ etc) it&#8217;s pure joy to work with.
You&#8217;ll need to install SSHFS on the client (the machine you want to mount the remote [...]]]></description>
			<content:encoded><![CDATA[<p>Lots of love going about today! This time, the recipient is SSHFS which allows you to mount a remote filing system onto your local tree over SSH. In a virtual hosting environment (/vhosts/ etc) it&#8217;s pure joy to work with.</p>
<p>You&#8217;ll need to install SSHFS on the client (the machine you want to mount the remote system on). All you need on the remote system is SSH. This is already installed on most systems.</p>
<p>You can install SSHFS on OSX with Mac Ports:</p>
<div class="codecolorer-container sql " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="sql codecolorer" style="font-family:Monaco,Lucida Console,monospace">port install sshfs</div></td></tr></tbody></table></div>
<p>On the local client system add the user you&#8217;re going to connect with to the fuse group. That group was created when you installed SSHFS:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">gpasswd -a localuser fuse</div></td></tr></tbody></table></div>
<p>Create a directory on the local filing system to use as a mount point:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">mkdir /vhosts_servername/</div></td></tr></tbody></table></div>
<p>Now connect to the remote system using a command line like this on the client:</p>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">sshfs localuser@yourdomain.com:/remote_directory/ /vhosts_servername</div></td></tr></tbody></table></div>
<p>Nice ;]</p>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/02/25/mount-remote-file-system-on-your-local-file-system-ssh-sshfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL GROUP_CONCAT concatenated grouping</title>
		<link>http://web-development-blog.co.uk/2009/01/18/mysql-group_concat-concatenated-grouping/</link>
		<comments>http://web-development-blog.co.uk/2009/01/18/mysql-group_concat-concatenated-grouping/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 10:40:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/2009/01/18/mysql-group_concat-concatenated-grouping/</guid>
		<description><![CDATA[Group and concatenate MySQL results and in this case make them distinct (unique):
1GROUP_CONCAT(DISTINCT landing_id ORDER BY landing_id SEPARATOR ',') as landing_ids
This produces a series of values separated by comas: 1,2,3,4,5.
Useful component of sub/nested queries.
]]></description>
			<content:encoded><![CDATA[<p>Group and concatenate MySQL results and in this case make them distinct (unique):</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace">GROUP_CONCAT(DISTINCT landing_id ORDER BY landing_id SEPARATOR ',') as landing_ids</div></td></tr></tbody></table></div>
<p>This produces a series of values separated by comas: 1,2,3,4,5.</p>
<p>Useful component of sub/nested queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/01/18/mysql-group_concat-concatenated-grouping/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL export SQL query as file</title>
		<link>http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/</link>
		<comments>http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 10:35:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux servers]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/</guid>
		<description><![CDATA[This will dump an SQL statement into a file:
1mysql -u username -p database_name -e &#34;SQL_STATEMENT&#34; &#38;gt; file.data
]]></description>
			<content:encoded><![CDATA[<p>This will dump an SQL statement into a file:</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:100%"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace">mysql -u username -p database_name -e &quot;SQL_STATEMENT&quot; <span class="sc1">&amp;gt;</span> file.data</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://web-development-blog.co.uk/2009/01/18/mysql-export-sql-query-as-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

