<?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>Glen Scott - Keeping it simple &#187; mac</title>
	<atom:link href="http://www.glenscott.co.uk/blog/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.glenscott.co.uk/blog</link>
	<description>Thoughts on software development and other geeky pursuits.</description>
	<lastBuildDate>Fri, 10 Feb 2012 17:23:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mac OS X 10.7.3 upgrades PHP from 5.3.6 to 5.3.8</title>
		<link>http://www.glenscott.co.uk/blog/2012/02/08/mac-os-x-10-7-3-upgrades-php-from-5-3-6-to-5-3-8/</link>
		<comments>http://www.glenscott.co.uk/blog/2012/02/08/mac-os-x-10-7-3-upgrades-php-from-5-3-6-to-5-3-8/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 17:22:31 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/blog/?p=741</guid>
		<description><![CDATA[As described in Apple&#8217;s security notes for Mac OS X 10.7.3, PHP is upgraded to version 5.3.8 as part of the update.]]></description>
			<content:encoded><![CDATA[<p>As described in Apple&#8217;s <a href="http://support.apple.com/kb/HT5130">security notes for Mac OS X 10.7.3</a>, PHP is upgraded to version 5.3.8 as part of the update.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2012/02/08/mac-os-x-10-7-3-upgrades-php-from-5-3-6-to-5-3-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iCal 502 error when syncing with Yahoo! Calendar</title>
		<link>http://www.glenscott.co.uk/blog/2011/10/26/ical-502-error-when-syncing-with-yahoo-calendar/</link>
		<comments>http://www.glenscott.co.uk/blog/2011/10/26/ical-502-error-when-syncing-with-yahoo-calendar/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 08:43:59 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[webapps]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[calendar]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/blog/?p=672</guid>
		<description><![CDATA[In the last few days, my iCal has been giving me the following error message when trying to access my Yahoo! Calendar via CalDAV: The request for account "Yahoo! Calendar" failed. The server responded with "502" to operation CalDAVAccountRefreshQueueableOperation. Yahoo! have acknowledged this is a problem on their side: We are aware of a Calendar [...]]]></description>
			<content:encoded><![CDATA[<p>In the last few days, my iCal has been giving me the following error message when trying to access my Yahoo! Calendar via CalDAV:</p>
<p><code>The request for account "Yahoo! Calendar" failed.</p>
<p>The server responded with<br />
"502"<br />
to operation<br />
CalDAVAccountRefreshQueueableOperation.<br />
</code></p>
<p><img src="/images/ical-502-error.png" width="534" height="312" alt="iCal error message when syncing with yahoo! calendar"></p>
<p>Yahoo! have acknowledged this is a problem on their side:</p>
<blockquote><p>
We are aware of a Calendar (Proxy error) and our engineering team is working to resolve this issue. We apologize for the inconvenience and hope to have it resolved soon.
</p></blockquote>
<p>(source: <a href="http://help.yahoo.com/l/us/yahoo/calendar/yahoocalendar/sync/">Syncing / Mobile Sync | Yahoo! Calendar Help</a>)</p>
<p><strong>update 2nd November 2011:</strong> I am no longer seeing this error message, and Yahoo! have removed the notice from their help page.  Looks like the issue has been resolved!</p>
<p><strong>update 3rd November 2011:</strong> Seems like I spoke too soon, the error is back!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2011/10/26/ical-502-error-when-syncing-with-yahoo-calendar/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Steve Jobs, 1955 &#8211; 2011</title>
		<link>http://www.glenscott.co.uk/blog/2011/10/06/steve-jobs-1955-2011/</link>
		<comments>http://www.glenscott.co.uk/blog/2011/10/06/steve-jobs-1955-2011/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 10:12:25 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/blog/?p=640</guid>
		<description><![CDATA[For me, it wasn&#8217;t the iPod, iPhone or iPad but the Mac that was Steve Jobs&#8217; greatest success. After buying an indigo iMac in 2000, it reignited my passion for computing and I never looked back. The Mac made computing pleasurable, and for that I will be eternally grateful to Steve&#8217;s vision and passion. A [...]]]></description>
			<content:encoded><![CDATA[<p>For me, it wasn&#8217;t the iPod, iPhone or iPad but the Mac that was Steve Jobs&#8217; greatest success.  After buying an indigo iMac in 2000, it reignited my passion for computing and I never looked back.  The Mac made computing pleasurable, and for that I will be eternally grateful to Steve&#8217;s vision and passion.  A truly inspiring man.</p>
<p>Thanks, Steve.</p>
<p><img src="/images/steve-jobs-m.png" width="600" alt="Steve Jobs on Apple homepage" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2011/10/06/steve-jobs-1955-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install mcrypt PHP extension on Mac OS X Lion</title>
		<link>http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/</link>
		<comments>http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:55:21 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[mcrypt]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/blog/?p=523</guid>
		<description><![CDATA[If you have a need to install the mcrypt extension for PHP, for example if you need to use phpMyAdmin, then these instructions are for you. Thankfully, it is becoming simpler to install PHP extensions than with previous versions of OS X. Xcode The Xcode package installs the necessary versions of tools like autoconf which [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a need to install the <a href="http://www.php.net/manual/en/book.mcrypt.php">mcrypt extension for PHP</a>, for example if you need to use <a href="http://www.phpmyadmin.net/">phpMyAdmin</a>, then these instructions are for you.</p>
<p>Thankfully, it is becoming simpler to install PHP extensions than with previous versions of OS X.  </p>
<h3>Xcode</h3>
<p>The Xcode package installs the necessary versions of tools like autoconf which is needed during the PHP extension compilation process. Make sure you have at least Xcode v4.1 installed; the install package (&#8220;Install Xcode&#8221;) is available in your &#8220;Applications&#8221; folder.</p>
<h3>libmcrypt</h3>
<p><a href="http://www.sourceforge.net/projects/mcrypt">libmcrypt</a> is the library that provides the encryption functions.  We need to install this before building the PHP extension.</p>
<ul>
<li>Open up Terminal.app</li>
<li>Download <a href="http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/">libmcrypt from sourceforge</a></li>
<li>Unpack the archive somewhere</li>
<li><code>cd libmcrypt</code></li>
<li><code>./configure</code></li>
<li><code>make</code></li>
<li><code>sudo make install</code></li>
</ul>
<h3>PHP Extension</h3>
<p>Once we have libmcrypt installed, we can build the PHP extension.</p>
<ul>
<li><a href="http://museum.php.net/php5/php-5.3.6.tar.bz2">Download PHP 5.3.6 source</a></li>
<li>Unpack the archive and <code>cd php-5.3.6/ext/mcrypt/</code></li>
<li>phpize</li>
</ul>
<p>You should see output similar to the following:</p>
<pre>
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
</pre>
<ul>
<li><code>./configure</code></li>
<li><code>make</code></li>
<li><code>sudo make install</code></li>
</ul>
<p>On successful install, you will see the following message:</p>
<pre>
Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20090626/
</pre>
<p>To enable the module, include the following line in your <code>/etc/php.ini</code> file:</p>
<pre>
extension = mcrypt.so
</pre>
<p>Finally, restart your Apache server:</p>
<pre>
sudo apachectl restart
</pre>
<p>And that&#8217;s it:  you should now be able to utilise the functions, as detailed in the <a href="http://uk3.php.net/mcrypt">PHP mcrypt documentation</a>.  If you are needing a simple way of accessing these functions, check out my <a href="http://www.glenscott.co.uk/blog/2012/02/09/simplecrypt-php-class-for-simple-cryptography/">SimpleCrypt class</a>.</p>
<p><a href="/images/mcrypt-106.png"><img src="/images/mcrypt-106-m.png" alt="mcrypt php extension"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Mac OS X Lion PHP upgrade &#8211; php.ini and Suhosin</title>
		<link>http://www.glenscott.co.uk/blog/2011/07/29/mac-os-x-lion-php-upgrade-php-ini-and-suhosin/</link>
		<comments>http://www.glenscott.co.uk/blog/2011/07/29/mac-os-x-lion-php-upgrade-php-ini-and-suhosin/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 10:58:57 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/blog/?p=517</guid>
		<description><![CDATA[If you have upgraded from Snow Leopard to the new OS X Lion, you will notice PHP has also been upgraded &#8211; from 5.2 to 5.3. A couple of points that I noticed post-install. Firstly, my existing /etc/php.ini file was moved to /etc/php.ini-5.2-previous. Restoring this was trivial: sudo cp /etc/php.ini-5.2-previous /etc/php.ini However, I noticed that [...]]]></description>
			<content:encoded><![CDATA[<p>If you have upgraded from Snow Leopard to the new OS X Lion, you will notice PHP has also been upgraded &#8211; from 5.2 to 5.3.</p>
<p>A couple of points that I noticed post-install.  Firstly, my existing <code>/etc/php.ini</code> file was moved to <code>/etc/php.ini-5.2-previous</code>.  Restoring this was trivial:</p>
<p><code>sudo cp /etc/php.ini-5.2-previous /etc/php.ini<br />
</code></p>
<p>However, I noticed that extensions previously installed under <code>/usr/lib/php/extensions/no-debug-non-zts-20090626/</code> had been removed.  So, if you have extensions that you wish to still use with 5.3, they will need to be re-built.</p>
<p>I also noticed that Apple have included the Suhosin patch and extension.  Suhosin is part of the <a href="http://www.hardened-php.net/">Hardened-PHP</a> project which aims to protect PHP applications against buffer-overflow and format string vulnerabilities.  In theory, this functionality should be transparent to your application &#8211; no configuration or code changes are required.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2011/07/29/mac-os-x-lion-php-upgrade-php-ini-and-suhosin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install memcached PHP extension on OS X Snow Leopard</title>
		<link>http://www.glenscott.co.uk/blog/2009/08/30/install-memcached-php-extension-on-os-x-snow-leopard/</link>
		<comments>http://www.glenscott.co.uk/blog/2009/08/30/install-memcached-php-extension-on-os-x-snow-leopard/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 15:54:21 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[snowleopard]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/?p=424</guid>
		<description><![CDATA[memcached is a very useful memory object caching system, which can be used to increase the performance of your dynamic scripts by caching database calls. This guide will explain how to install the memcached system, including the PHP extension, on Mac OS X 10.6. Xcode The Xcode package installs the necessary versions of tools like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/chrissinjo/5368405044/" title="Memories by ChrisSinjo, on Flickr"><img src="http://farm6.static.flickr.com/5089/5368405044_c49ce38414.jpg" width="500" height="334" alt="Memories"></a></p>
<p><a href="http://www.danga.com/memcached/">memcached</a> is a very useful memory object caching system, which can be used to increase the performance of your dynamic scripts by caching database calls.</p>
<p>This guide will explain how to install the memcached system, including the PHP extension, on Mac OS X 10.6.</p>
<h2>Xcode</h2>
<p>The Xcode package installs the necessary versions of tools like autoconf which is needed during the PHP extension compilation process.  Make sure you have Xcode 3.2 installed;  the install package is available on the Snow Leopard install DVD under the &#8220;Optional Installs&#8221; folder.</p>
<h2>libevent</h2>
<p><a href="http://www.monkey.org/~provos/libevent/">libevent</a> is a pre-requisite for memcached.</p>
<ul>
<li><code>cd /tmp; curl -O http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gz</code></li>
<li><code>tar zxvf libevent-1.4.12-stable.tar.gz</code></li>
<li><code>cd libevent-1.4.12-stable</code></li>
<li><code>./configure; make</code></li>
<li><code>sudo make install</code></li>
</ul>
<h2>memcached</h2>
<p><a href="http://www.danga.com/memcached/download.bml">memcached</a> is the daemon responsible for actually storing and retrieving arbitrary objects for your applications.</p>
<ul>
<li><code>cd /tmp; curl -O http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz</code></li>
<li><code>tar zxvf memcached-1.4.1.tar.gz</code></li>
<li><code>cd  memcached-1.4.1</code></li>
<li><code>./configure; make</code></li>
<li><code>sudo make install</code></li>
</ul>
<h2>libmemcached</h2>
<p><a href="http://freshmeat.net/projects/libmemcached">libmemcached</a> is the shared library that will allow clients, in this case PHP, access the memcached daemon.</p>
<ul>
<li>Download libmemcached, move to <code>/tmp</code> and unpack</li>
<li><code>cd libmemcached-0.31</code></li>
<li><code>./configure; make</code></li>
<li><code>sudo make install</code></li>
</ul>
<h2>php extension</h2>
<p>Now we are ready to prepare the PHP extension to memcached, which is available from <a href="http://pecl.php.net">pecl</a>.</p>
<ul>
<li><code>cd /tmp; pecl download memcached</code></li>
<li><code>gzip -d < memcached-1.0.0.tgz | tar -xvf -</code></li>
<li><code>cd memcached-1.0.0; phpize</code></li>
</ul>
<p>You should see output similar to the following:<br />
<code><br />
Configuring for:<br />
PHP Api Version:         20090626<br />
Zend Module Api No:      20090626<br />
Zend Extension Api No:   220090626<br />
</code></p>
<ul>
<li><code>./configure; make</code></li>
<li><code>sudo make install</code></li>
</ul>
<p>On a successful install, you will get the following message:</p>
<p><code>Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20090626/</code></p>
<p>Modify your <code>php.ini</code> configuration file and make sure you have the following line included:</p>
<p><code>extension = memcached.so</code></p>
<p>You can then restart your Apache server:</p>
<ul>
<li><code>sudo apachectl restart</code></li>
</ul>
<p>to make the memcached functionality available in your scripts.</p>
<p><a href="/images/memcached-php.png"><img src="/images/memcached-php-med.png" width="450" height="140" alt="memcached php extension" border="0"></a></p>
<h2>References</h2>
<ul>
<li><a href="http://php.net/manual/en/install.pecl.phpize.php">Compiling shared PECL extensions with phpize</a></li>
<li><a href="http://php.net/memcached">PHP: Memcached - Manual</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2009/08/30/install-memcached-php-extension-on-os-x-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Fix PHP timezone warnings in OS X Snow Leopard</title>
		<link>http://www.glenscott.co.uk/blog/2009/08/30/fix-php-timezone-warnings-in-os-x-snow-leopard/</link>
		<comments>http://www.glenscott.co.uk/blog/2009/08/30/fix-php-timezone-warnings-in-os-x-snow-leopard/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 09:07:30 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[snowleopard]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/?p=417</guid>
		<description><![CDATA[The standard Mac install of PHP has always been somewhat quirky, and 10.6 is no exception. One of the most obvious issues occurs when attempting to use date/time functions. PHP 5.3 requires that the date.timezone setting is available. Without this, you will receive a warning similar to the following: Warning: getdate() [function.getdate]: It is not [...]]]></description>
			<content:encoded><![CDATA[<p>The standard Mac install of PHP has always been somewhat quirky, and 10.6 is no exception.  One of the most obvious issues occurs when attempting to use <a href="http://php.net/manual/en/ref.datetime.php">date/time functions</a>.  PHP 5.3 requires that the <a href="http://php.net/manual/en/datetime.configuration.php#ini.date.timezone">date.timezone</a> setting is available.  Without this, you will receive a warning similar to the following:</p>
<p><code>Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /Users/gscott/Sites/hello-world.php on line 9</code></p>
<p>The solution is to edit (or create, if it doesn&#8217;t exist) <code>/private/etc/php.ini</code> and make sure a setting exists for <code>date.timezone</code>.  For example:</p>
<p>    date.timezone = Europe/London</p>
<p>After making the change, restart Apache</p>
<p>    sudo apachectl restart</p>
<ul>
<li><a href="http://php.net/manual/en/timezones.php">List of supported timezones</a>.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2009/08/30/fix-php-timezone-warnings-in-os-x-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>mcrypt support for PHP on 64 bit Mac OS X 10.5</title>
		<link>http://www.glenscott.co.uk/blog/2009/03/16/mcrypt-support-for-php-on-64-bit-mac-os-x-105/</link>
		<comments>http://www.glenscott.co.uk/blog/2009/03/16/mcrypt-support-for-php-on-64-bit-mac-os-x-105/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 20:31:28 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[mcrypt]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/?p=389</guid>
		<description><![CDATA[Please note: The article below refers to installing mcrypt on Mac OS X 10.5. If you have 10.6 Snow Leopard, please see my updated guide: Install mcrypt PHP extension on OS X Snow Leopard Adding additional functionality to the standard Apple-supplied PHP on Mac OS X 10.5 is a little tricky if you are running [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Please note:  The article below refers to installing mcrypt on Mac OS X 10.5.  If you have 10.6 Snow Leopard, please see my updated guide:  <a href="/blog/2011/02/03/install-mcrypt-php-extension-on-os-x-snow-leopard/">Install mcrypt PHP extension on OS X Snow Leopard</a></strong></p>
<p>Adding additional functionality to the standard Apple-supplied PHP on Mac OS X 10.5 is a little tricky if you are running a 64 bit processor such as the Intel Core 2 Duo.  The reason is that any dynamic extensions that you add will need to be 64 bit, and many shared libraries by default will compile as 32 bit binaries.  Trying to use a 32 bit extension with a 64 bit PHP results in the following unfriendly error message:</p>
<p><code>PHP Warning:  PHP Startup: Unable to load dynamic library './mcrypt.so' - (null) in Unknown on line 0</code></p>
<p><a href="http://php.net/mcrypt">mcrypt</a> is a good example of a useful extension that can be added to PHP with a little bit of effort:</p>
<ul>
<li>Open up your Terminal.app</li>
<li>To explicitly build for 64 bit architecture <code>export CFLAGS="-arch x86_64"</code></li>
<li>Download libmcrypt from sourceforge <a href="http://sourceforge.net/projects/mcrypt">http://sourceforge.net/projects/mcrypt</a></li>
<li>Unpack the archive</li>
<li><code>cd libmcrypt</code></li>
<li><code>./configure --disable-shared</code></li>
<li><code>make</code></li>
<li><code>sudo make install</code></li>
<li>download PHP 5.2.6 source from <a href=" http://www.php.net/get/php-5.2.6.tar.bz2/from/a/mirror">http://www.php.net/get/php-5.2.6.tar.bz2/from/a/mirror</a></li>
<li>unpack the archive and go into the <code>php-5.2.6/ext/mcrypt/</code> dir</li>
<li><code>phpize</code></li>
<li><code>./configure</code></li>
<li><code>make</code></li>
<li><code>sudo make install</code></li>
<li>verify the extension is 64 bit: <code>file /usr/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so</code></li>
</ul>
<p><code>/usr/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so: Mach-O 64-bit bundle x86_64</code></p>
<p>To actually use the extension, you can simply create a symbolic link to it.  For example:</p>
<ul>
<li><code>cd ~/Sites</code></li>
<li><code>ln -s  /usr/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so</code></li>
</ul>
<h3>Example code:  mcrypt.php</h3>
<p>Drop the following code into your <code>~/Sites</code> directory to verify everything is working:</p>
<pre class="brush: php; title: ; notranslate">
    &lt;?php

    if ( ! extension_loaded('mcrypt') ) {
        dl('mcrypt.so');
    }

    $key   = &quot;this is a secret key&quot;;
    $input = &quot;Let us meet at 9 o'clock at the secret place.&quot;;

    $td = mcrypt_module_open('tripledes', '', 'ecb', '');
    $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
    mcrypt_generic_init($td, $key, $iv);
    $encrypted_data = mcrypt_generic($td, $input);
    mcrypt_generic_deinit($td);
    mcrypt_module_close($td);

    print_r($encrypted_data);

    ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2009/03/16/mcrypt-support-for-php-on-64-bit-mac-os-x-105/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Shared memory fix for PostgreSQL Mac installation</title>
		<link>http://www.glenscott.co.uk/blog/2008/12/24/shared-memory-fix-for-postgresql-mac-installation/</link>
		<comments>http://www.glenscott.co.uk/blog/2008/12/24/shared-memory-fix-for-postgresql-mac-installation/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 11:00:33 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[shm]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/?p=280</guid>
		<description><![CDATA[EnterpriseDB have kindly created a one-click installer for PostgreSQL, but unfortunately it doesn&#8217;t work out-of-the-box, at least not on my MacBook Pro. The problem is down to the amount of shared memory that is configured in OS X; by default it is 4Mb, and PostgreSQL requires 32Mb: The error message suggests looking at the README [...]]]></description>
			<content:encoded><![CDATA[<p>EnterpriseDB have kindly created a <a href="http://www.enterprisedb.com/products/pgdownload.do#osx">one-click installer for PostgreSQL</a>, but unfortunately it doesn&#8217;t work out-of-the-box, at least not on my MacBook Pro.  The problem is down to the amount of shared memory that is configured in OS X;  by default it is 4Mb, and PostgreSQL requires 32Mb:</p>
<p><img src="http://www.glenscott.co.uk/images/postgres-shared-memory-error.png" alt="Postgres installer error" /></p>
<p>The error message suggests looking at the README file, which actually doesn&#8217;t exist.  Luckily, there&#8217;s a simple fix;  to increase the shared memory to the required 32Mb, create or edit the <code>/etc/sysctl.conf</code> file and include the following lines:</p>
<pre>
kern.sysv.shmall=8192
kern.sysv.shmseg=64
kern.sysv.shmmni=256
kern.sysv.shmmin=1
kern.sysv.shmmax=33554432
</pre>
<p>Reboot your machine for the settings to take effect, and re-launch the PostgreSQL installer which should now work as normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2008/12/24/shared-memory-fix-for-postgresql-mac-installation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Subversion 1.5 on Mac OS X</title>
		<link>http://www.glenscott.co.uk/blog/2008/12/17/installing-subversion-15-on-mac-os-x/</link>
		<comments>http://www.glenscott.co.uk/blog/2008/12/17/installing-subversion-15-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 17:12:58 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.glenscott.co.uk/?p=272</guid>
		<description><![CDATA[My current project at Yahoo! is using a Subversion repository for version control, as opposed to the usual CVS (thankfully). Unfortunately, it turns out that the svn client installed on Mac OS X Leopard up to and including 10.5.6, is 1.4 whereas the &#8220;best&#8221; release is 1.5. It&#8217;s very simple to get the newer 1.5 [...]]]></description>
			<content:encoded><![CDATA[<p>My current project at Yahoo! is using a Subversion repository for version control, as opposed to the usual CVS (thankfully).  Unfortunately, it turns out that the svn client installed on Mac OS X Leopard up to and including 10.5.6, is 1.4 whereas the <a href="http://subversion.tigris.org/svn_1.5_releasenotes.html">&#8220;best&#8221;</a> release is 1.5.</p>
<p>It&#8217;s very simple to get the newer 1.5 version up and running by compiling from source:</p>
<ul>
<li>Download the source code from <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&#038;expandFolder=74">subversion:        Documents &amp; files: Source code</a></li>
<li>Unpack the source code and enter the <code>subversion-1.5.x</code> directory</li>
<li><code>./configure --without-sasl</code></li>
<li><code>make</code></li>
<li><code>sudo make install</code></li>
</ul>
<p>This will install Subversion 1.5 in your <code>/usr/local path</code>.</p>
<p>I added the <code>--without-sasl</code> option to prevent the following error from occurring when committing files:</p>
<pre>
svn: Commit failed (details follow):
svn: Cannot negotiate authentication mechanism
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.glenscott.co.uk/blog/2008/12/17/installing-subversion-15-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

