<?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>www.pokeroconnor.com</title>
	<atom:link href="http://www.pokeroconnor.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pokeroconnor.com</link>
	<description></description>
	<lastBuildDate>Fri, 19 Aug 2011 18:59:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>SPL CSV File Iterator</title>
		<link>http://www.pokeroconnor.com/spl-csv-files/</link>
		<comments>http://www.pokeroconnor.com/spl-csv-files/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 18:48:58 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=428</guid>
		<description><![CDATA[When using PHP&#8217;s SplFileObject for CSV file manipulation, as you will likely discover fgetcsv() also includes empty lines in the returned array. The suggestion is to use SplFileObject::DROP_NEW_LINE or SplFileObject::SKIP_EMPTY to handle this. However, I find I often need to use both to achieve the desired result of ignoring blank or empty lines. To achieve [...]]]></description>
			<content:encoded><![CDATA[<p>When using PHP&#8217;s SplFileObject for <a href="http://ie.php.net/manual/en/splfileobject.fgetcsv.php">CSV file manipulation</a>, as you will likely discover <em>fgetcsv</em>() also includes empty lines in the returned array.</p>
<p>The suggestion is to use <em>SplFileObject::DROP_NEW_LINE</em> or <em>SplFileObject::SKIP_EMPTY</em> to handle this.</p>
<p>However, I find I often need to use <strong>both</strong> to achieve the desired result of ignoring blank or empty lines. To achieve this, you need to use a bitmask in your <em>setflags</em> argument.</p>
<p>A value of &#8217;7&#8242; corresponds to both <em>SplFileObject::DROP_NEW_LINE</em> AND <em>SplFileObject::SKIP_EMPTY, e.g.<br />
</em></p>
<p><em><strong>$file = new SplFileObject($path); </strong></em><br />
<em><strong>$file-&gt;setFlags(7);</strong></em></p>
<p><em>setFlags(15) </em>would correspond to a <a href="http://www.daniweb.com/web-development/php/threads/331879">bitmask for DROP_NEWLINE, SKIP_EMPTY, READ_CSV</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/spl-csv-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Guide to New WordPress Install</title>
		<link>http://www.pokeroconnor.com/quick-guide-to-new-wordpress-install/</link>
		<comments>http://www.pokeroconnor.com/quick-guide-to-new-wordpress-install/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 19:50:55 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=424</guid>
		<description><![CDATA[http://codex.wordpress.org/Installing_WordPress Logon to your server, and cd document_root_name wget http://wordpress.org/latest.tar.gz tar -xzvf latest.tar.gz cd wordpress cp -r * ../ cd .. rm -r wordpress rm latest.tar.gz http://codex.wordpress.org/Installing_WordPress#Using_phpMyAdmin sudo chown www-data document_root_name/ http://example.com/wp-admin/install.php http://codex.wordpress.org/Changing_The_Site_URL. This is followed if you want to change the WordPress site name from example.com to www.example.com. You may need to add update_option(&#8216;siteurl&#8217;,'http://example.com/blog&#8217;); [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="http://codex.wordpress.org/Installing_WordPress">http://codex.wordpress.org/Installing_WordPress</a></li>
<li>Logon to your server, and <em>cd document_root_name</em></li>
<li>wget http://wordpress.org/latest.tar.gz</li>
<li>tar -xzvf latest.tar.gz</li>
<li>cd wordpress</li>
<li>cp -r * ../</li>
<li>cd ..</li>
<li>rm -r wordpress</li>
<li>rm latest.tar.gz</li>
<li>http://codex.wordpress.org/Installing_WordPress#Using_phpMyAdmin</li>
<li>sudo chown www-data document_root_name/</li>
<li>http://example.com/wp-admin/install.php</li>
<li><a href="http://codex.wordpress.org/Changing_The_Site_URL">http://codex.wordpress.org/Changing_The_Site_URL</a>. This is followed if you want to <a href="http://www.pokeroconnor.com/wordpress-site-redirect/">change the WordPress site name </a>from example.com to www.example.com. You may need to add update_option(&#8216;siteurl&#8217;,'http://example.com/blog&#8217;); and update_option(&#8216;home&#8217;,'http://example.com/blog&#8217;); to the theme functions.php file. Then reload site, then DELETE these two lines from theme functions.php file.</li>
<li>Change default theme to custom theme, so future updates don&#8217;t wipe your changes: cp -r twentyten/ customtheme</li>
<li>Run script as defined on http://www.pokeroconnor.com/recursive-sed-script/ to change all previous theme name mentions</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/quick-guide-to-new-wordpress-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive SED Script</title>
		<link>http://www.pokeroconnor.com/recursive-sed-script/</link>
		<comments>http://www.pokeroconnor.com/recursive-sed-script/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:55:16 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Linux/Unix/OSX/Apache]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=420</guid>
		<description><![CDATA[There are often times I want to run a SED find and replace across recursive directories, and the below is a very handy script to do so, from this excellent resource. There&#8217;s plenty of other variations of it there too. #SR does global replacement in html files, replacing its first parameter by #its second parameter--use [...]]]></description>
			<content:encoded><![CDATA[<p>There are often times I want to run a SED find and replace across recursive directories, and the below is a very handy script to do so, from<a href="http://cs.simons-rock.edu/unix/sed.html"> this excellent resource</a>. There&#8217;s plenty of other variations of it there too.</p>
<p><code><br />
#SR does global replacement in html files, replacing its first parameter by<br />
#its second parameter--use with extreme caution!</code></p>
<p><code> </code></p>
<p><code>find ./ -name '*.html' -print | while read i<br />
do<br />
sed "s/$1/$2/g" $i &gt;$i.bak &amp;&amp; mv $i.bak $i<br />
done<br />
</code></p>
<p>To use this, simply execute the command via:</p>
<p><code>./SR term_to_find term_to_replace_with</code></p>
<p>As a slight tweak, and what I find more useful, is to add a third input param, for example to switch on the file names you want to replace:</p>
<p><code>#SR does global replacement in files specified in STDIN as third parameter, replacing its first parameter by<br />
#its second parameter--use with extreme caution!</code></p>
<p><code>find ./ -name "*.$3" -print | while read i<br />
do<br />
sed "s/$1/$2/g" $i &gt;$i.bak &amp;&amp; mv $i.bak $i<br />
done</code></p>
<p>For example, to replace image1.jpg with image2.jpg, in all css files, run this:</p>
<p><code>./SR image1.jpg image2.jpg css</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/recursive-sed-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add New Header Image to Theme</title>
		<link>http://www.pokeroconnor.com/add-new-header-image-to-theme/</link>
		<comments>http://www.pokeroconnor.com/add-new-header-image-to-theme/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:24:09 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=418</guid>
		<description><![CDATA[In WordPress, for example in the TwentyTen theme, you may want to add a new header image to the default options available. This is useful for example if you are copying this theme, to use as the basis for a new theme. To do so, first upload the image you want to use, and a [...]]]></description>
			<content:encoded><![CDATA[<p>In WordPress, for example in the TwentyTen theme, you may want to add a new header image to the default options available. This is useful for example if you are copying this theme, to use as the basis for a new theme.</p>
<p>To do so, first upload the image you want to use, and a thumbnail of it to the <strong><em>wp-content/themes/NEW_THEME_NAME/images/headers</em></strong> directory.</p>
<p>Then, in <em>wp-content/themes/NEW_THEME_NAME/</em><strong><em>functions.php</em></strong> edit the<strong><em> </em>register_default_headers </strong>function<strong><em></em></strong>, to replace &#8216;sunset&#8217; below with your new image details:<br />
<code><br />
'sunset' =&gt; array(<br />
'url' =&gt; '%s/images/headers/sunset.jpg',<br />
'thumbnail_url' =&gt; '%s/images/headers/sunset-thumbnail.jpg',<br />
/* translators: header image description */<br />
'description' =&gt; __( 'Sunset', 'copied_twenty_theme' )<br />
),<br />
</code></p>
<p>Then go to Appearance -&gt; Theme -&gt; Headers in your Admin panel, and you should be able to select the new image as header.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/add-new-header-image-to-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Visual Editor Missing</title>
		<link>http://www.pokeroconnor.com/wordpress-visual-editor-missing/</link>
		<comments>http://www.pokeroconnor.com/wordpress-visual-editor-missing/#comments</comments>
		<pubDate>Wed, 04 May 2011 22:20:48 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=412</guid>
		<description><![CDATA[This is an annoying issue that happened to me lately, whereby the WordPress visual editor had its buttons and icons missing. I trawled various forums, and got the usual &#8220;do a full re-install&#8221; etc, or disable and re-enable all plugins blah blah blah. The solution is here &#8211; its elegant, simple and a one-liner: add [...]]]></description>
			<content:encoded><![CDATA[<p>This is an annoying issue that happened to me lately, whereby the WordPress visual editor had its buttons and icons missing.</p>
<p>I trawled various forums, and got the usual &#8220;do a full re-install&#8221; etc, or disable and re-enable all plugins blah blah blah.</p>
<p>The solution is <a href="http://wordpress.org/support/topic/visual-post-editor-not-working-only-html-post-editor">here</a> &#8211; its elegant, simple and a one-liner: add the below line to your wp-config.php file.</p>
<p><strong><em>define(&#8216;CONCATENATE_SCRIPTS&#8217;, false );</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/wordpress-visual-editor-missing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Boot Issue Module Not Found</title>
		<link>http://www.pokeroconnor.com/linux-boot-issue-module-not-found/</link>
		<comments>http://www.pokeroconnor.com/linux-boot-issue-module-not-found/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 22:01:45 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Linux/Unix/OSX/Apache]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=376</guid>
		<description><![CDATA[This is a common issue on Dell and HP laptops apparently, and is not a Windows issue per se. For me, it happened on a Dell machine, and it is incredibly annoying. So, if you have enabled dual-booting, with say a Windows and Linux partition, all seems fine booting into your Ubuntu install, until that [...]]]></description>
			<content:encoded><![CDATA[<p>This is a common issue on Dell and HP laptops apparently, and is not a Windows issue per se.</p>
<p>For me, it happened on a Dell machine, and it is incredibly annoying.</p>
<p>So, if you have enabled <strong>dual-booting</strong>, with say a Windows and Linux partition, all seems fine booting into your Ubuntu install, until that is, you boot up Windows,<em><strong> and then try to subsequently boot up your machine</strong></em> to either Windows or Linux.</p>
<p>What happens is a message:</p>
<p dir="ltr">module name not found, press any key</p>
<p dir="ltr">Of course pressing the &#8220;any key&#8221; does nothing, and you are unable to boot up any OS from the HDD.</p>
<p>There are a series of excellent links on this, all worth a look, as your situation may have slight differences to some mentioned scenarios within the links below:</p>
<ul>
<li>http://ubuntuforums.org/showthread.php?t=1501591</li>
<li>http://ubuntuforums.org/showthread.php?t=1560177</li>
<li>http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Windows_Writes_To_MBR</li>
<li>http://ubuntuforums.org/showthread.php?t=1343851&amp;page=2</li>
</ul>
<p>What is happening is that certain Dell software, e.g. Datasafe, modify the MBR, and your GRUB gets corrupted/needs to be re-installed.</p>
<p><span style="text-decoration: underline;"><strong>Quick Solution:</strong></span></p>
<p>As described in links above, for a quick fix to allow you boot in again, load up your Live CD, e.g. ubuntu install CD you can download easily (using a Knoppix boot for example from the CD drive), and run from the CD drive. Then, open a terminal shell, and do the following:</p>
<p><em>sudo mount /dev/sda3 /mnt</em><br />
<em>sudo grub-install &#8211;recheck &#8211;root-directory=/mnt /dev/sda</em></p>
<p>In the above, sda3 represents whatever partition your Linux install is on, so will likely be different for you &#8211; that should be the only thing you need to change above.</p>
<p>Once done, you can boot up again as per usual, until of course you log into Windows again!</p>
<p>So long-term solution is to identify all Dell proprietary software (most listed in links above and http://download.cnet.com/ccleaner/ and http://forum.notebookreview.com/dell-xps-studio-xps/406492-how-do-i-remove-dells-datasafe.html), fully delete them using CC Cleaner for example, re-boot using the Live CD GRUB trick one final time, and then you should be good!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/linux-boot-issue-module-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Restore Panels</title>
		<link>http://www.pokeroconnor.com/ubuntu-restore-panels/</link>
		<comments>http://www.pokeroconnor.com/ubuntu-restore-panels/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 21:46:18 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Linux/Unix/OSX/Apache]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=372</guid>
		<description><![CDATA[Running Ubuntu 10.10, and I accidentally deleted the panel (strip of information toolbar at the top of the screen). To get it back, just do as described here, but watching out for the typos in the commands as printed there, namely: gconftool &#8211;recursive-unset /apps/panel rm -rf ~/.gconf/apps/panel pkill gnome-panel Viola!!]]></description>
			<content:encoded><![CDATA[<p>Running Ubuntu 10.10, and I accidentally deleted the panel (strip of information toolbar at the top of the screen).</p>
<p>To get it back, just do <a href="http://www.watchingthenet.com/restore-panels-in-ubuntu-back-to-their-default-settings.html">as described here</a>, but watching out for the typos in the commands as printed there, namely:</p>
<p><em>gconftool &#8211;recursive-unset /apps/panel</em></p>
<p><em>rm -rf ~/.gconf/apps/panel</em></p>
<p><em>pkill gnome-panel</em></p>
<p>Viola!!<em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/ubuntu-restore-panels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postfix create file maildrop warning</title>
		<link>http://www.pokeroconnor.com/postfix-create-file-maildrop-warning/</link>
		<comments>http://www.pokeroconnor.com/postfix-create-file-maildrop-warning/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 20:42:45 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Linux/Unix/OSX/Apache]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=332</guid>
		<description><![CDATA[If you ever see the following in your logs, warning: mail_queue_enter: create file maildrop/636773.1040: Permission denied It measn postfix is not running, and you have problems! Running postfix check will likely result in: postsuper: fatal: scan_dir_push: open directory defer: Permission denied What this means is that the permissions for postfix dirs are all screwed, most [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever see the following in your logs,</p>
<p><em>warning: mail_queue_enter: create file maildrop/636773.1040: Permission denied</em></p>
<p>It measn postfix is not running, and you have problems!</p>
<p>Running<br />
<em>postfix check</em></p>
<p>will likely result in:</p>
<p><em>postsuper: fatal: scan_dir_push: open directory defer: Permission denied</em></p>
<p>What this means is that the permissions for postfix dirs are all screwed, most likely after a server restart (that&#8217;s when it normally happens for me at least).</p>
<p>You can<a href="http://inmyplace.info/2008/05/07/postfix-warning-mail_queue_enter-create-file-maildrop-permission-denied/"> confirm this</a> by doing:</p>
<p><em>postfix start</em></p>
<p>and observing:</p>
<p><em>&#8220;postfix&#8221; postsuper: fatal: scan_dir_push:<br />
open directory defer: Permission denied</em></p>
<p><a href="http://www.linuxquestions.org/questions/linux-server-73/postfix-no-start-817405/">To solve</a>, run:</p>
<p><em>postfix set-permissions</em></p>
<p>You may still have to make minor permission changes, to change owner from root to postfix for the /var/lib/postfix files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/postfix-create-file-maildrop-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpmyadmin cant create database error</title>
		<link>http://www.pokeroconnor.com/phpmyadmin-cant-create-database-error/</link>
		<comments>http://www.pokeroconnor.com/phpmyadmin-cant-create-database-error/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 23:02:57 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Linux/Unix/OSX/Apache]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=327</guid>
		<description><![CDATA[If you&#8217;re getting the following error in phpmyadmin when creating a new database: #1006 &#8211; Can&#8217;t create database The problem is that /var/lib/mysql is probably owned by root, and ALSO in the root group. It should not be. ls -ld /var/lib/mysql probably looks like this: drwxrwxr-x 4 root root 4096 2010-11-01 23:45 /var/lib/mysql It should [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re getting the following error in phpmyadmin when creating a new database:</p>
<p><em><strong>#1006 &#8211; Can&#8217;t create database</strong></em></p>
<p>The problem is that /var/lib/mysql is probably owned by root, and ALSO in the root group. It should not be.</p>
<p>ls -ld /var/lib/mysql probably looks like this:</p>
<p>drwxrwxr-x 4 root root 4096 2010-11-01 23:45 /var/lib/mysql</p>
<p>It should be:</p>
<p>drwxrwxr-x 4 root mysql 4096 2010-11-01 23:45 /var/lib/mysql</p>
<p>So, run</p>
<p>chgrp -R mysql /var/lib/mysql</p>
<p>and you should be able to create databases now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/phpmyadmin-cant-create-database-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpmyadmin debian password protect</title>
		<link>http://www.pokeroconnor.com/phpmyadmin-debian-password-protect/</link>
		<comments>http://www.pokeroconnor.com/phpmyadmin-debian-password-protect/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 23:22:31 +0000</pubDate>
		<dc:creator>PokerOConnor</dc:creator>
				<category><![CDATA[Linux/Unix/OSX/Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.pokeroconnor.com/?p=321</guid>
		<description><![CDATA[Quick one &#8211; steps to password protect your phpmyadmin on Debian. Good idea also to use a symlink to obfuscate the &#8216;phpmyadmin&#8217; url too. Eg. within the docroot of a site I wish to install phpmyadmin on, I would do: cd /var/www/site ln -s SECRET_PATH_TO_DB /usr/share/phpmyadmin/ Your phpmyadmin install is then available on site.com/SECRET_PATH_TO_DB For [...]]]></description>
			<content:encoded><![CDATA[<p>Quick one &#8211; steps to<a href="http://www.halecomm.net/blog/2010/03/htpasswd-protecting-your-phpmyadmin-installation-debian/"> password protect your phpmyadmin on Debian</a>.</p>
<p>Good idea also to use a symlink to obfuscate the &#8216;phpmyadmin&#8217; url too.</p>
<p>Eg. within the docroot of a site I wish to install phpmyadmin on, I would do:</p>
<p>cd /var/www/site</p>
<p>ln -s SECRET_PATH_TO_DB /usr/share/phpmyadmin/</p>
<p>Your phpmyadmin install is then available on site.com/SECRET_PATH_TO_DB</p>
<p>For the htaccess password protection, this is a<a href="http://www.htaccesstools.com/htpasswd-generator/"> very handy generator tool.</a> The username and password you choose for the .htpasswd protection should be saved to <strong>/usr/share/phpmyadmin/.htpasswd</strong> (swap /usr/share for whatever install path you have).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pokeroconnor.com/phpmyadmin-debian-password-protect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

