<?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>Random Rantings of a Demented Mind</title>
	<atom:link href="http://www.403.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.403.be</link>
	<description>Dribblings from the mind of a rabid PHP geek</description>
	<lastBuildDate>Fri, 04 Dec 2009 16:14:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>unit tests for PECL extensions and how to make them work</title>
		<link>http://www.403.be/unit-tests-for-pecl-extensions-and-how-to-make-them-work/</link>
		<comments>http://www.403.be/unit-tests-for-pecl-extensions-and-how-to-make-them-work/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:51:34 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[make test]]></category>

		<guid isPermaLink="false">http://www.403.be/?p=65</guid>
		<description><![CDATA[Recently I&#8217;ve been installing a few PECL extensions, I dev on Snow Leopard which is PHP 5.3 but my colod server is Ubuntu 8.04 LTS which is PHP 5.2, so being me I ignored the various warnings on the sqlite3 page of php.net ( Note: This extension was briefly a PECL extension but that version [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been installing a few PECL extensions, I dev on Snow Leopard which is PHP 5.3 but my colod server is Ubuntu 8.04 LTS which is PHP 5.2, so being me I ignored the various warnings on the <a href="http://www.php.net/manual/en/sqlite3.installation.php">sqlite3</a> page of <a href="http://www.php.net">php.net</a> ( Note: This extension was briefly a PECL extension but that version is only recommended for experimental use. ).<br />
I managed to get the extension installed fine ( phpize, ./configure, sudo make, sudo make install )<br />
<code><br />
wget http://pecl.php.net/get/sqlite3-0.6.tgz<br />
tar xvzf sqlite3-0.6.tgz<br />
cd sqlite3-0.6/<br />
phpize<br />
./configure<br />
sudo make<br />
sudo make install<br />
</code><br />
Now the last line for make install asks you kindly to &#8220;Don&#8217;t forget to run &#8216;make test&#8217;.&#8221;<br />
So let&#8217;s do that<br />
<span style='cursor:pointer; color:red;' onclick="if ( document.getElementById('peclCut').style.display=='none' ){document.getElementById('peclCut').style.display='block';}else{document.getElementById('peclCut').style.display='none';}return false;">Lots of output</span></p>
<div style='display:none' id='peclCut'>
<code><br />
make test</p>
<p>gabriel@daughterofseabiscuit:~/sqlite3-0.6$ make test</p>
<p>Build complete.<br />
Don't forget to run 'make test'.</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/runkit.so' - modules/runkit.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/mcrypt.so' - modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/ffmpeg.so' - modules/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/gd.so' - modules/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/mysql.so' - modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/mysqli.so' - modules/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/pdo.so' - modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/pdo_mysql.so' - modules/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/pdo_sqlite.so' - modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/snmp.so' - modules/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/sqlite.so' - modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/tidy.so' - modules/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: Module 'sqlite3' already loaded in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/runkit.so' - modules/runkit.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/mcrypt.so' - modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/ffmpeg.so' - modules/ffmpeg.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/gd.so' - modules/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/mysql.so' - modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/mysqli.so' - modules/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/pdo.so' - modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/pdo_mysql.so' - modules/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/pdo_sqlite.so' - modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/snmp.so' - modules/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/sqlite.so' - modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: PHP Startup: Unable to load dynamic library 'modules/tidy.so' - modules/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0</p>
<p>Warning: Module 'sqlite3' already loaded in Unknown on line 0</p>
<p>=====================================================================<br />
CWD         : /home/gabriel/sqlite3-0.6<br />
PHP         : /usr/bin/php<br />
PHP_SAPI    : cli<br />
PHP_VERSION : 5.2.4-2ubuntu5.9<br />
ZEND_VERSION: 2.2.0<br />
PHP_OS      : Linux - Linux daughterofseabiscuit.angelhosts.org 2.6.24-25-server #1 SMP Tue Oct 20 08:12:40 UTC 2009 i686<br />
INI actual  : /etc/php5/cli/php.ini<br />
More .INIs  : /etc/php5/cli/conf.d/ffmpeg.ini,/etc/php5/cli/conf.d/gd.ini,/etc/php5/cli/conf.d/mysql.ini,/etc/php5/cli/conf.d/mysqli.ini,/etc/php5/cli/conf.d/pdo.ini,/etc/php5/cli/conf.d/pdo_mysql.ini,/etc/php5/cli/conf.d/pdo_sqlite.ini,/etc/php5/cli/conf.d/snmp.ini,/etc/php5/cli/conf.d/sqlite.ini,/etc/php5/cli/conf.d/sqlite3.ini,/etc/php5/cli/conf.d/tidy.ini<br />
Extra dirs  :<br />
=====================================================================<br />
Running selected tests.<br />
FAIL SQLite3::open/close tests [tests/sqlite3_01_open.phpt]<br />
FAIL SQLite3::query CREATE tests [tests/sqlite3_02_create.phpt]<br />
FAIL SQLite3::query INSERT tests [tests/sqlite3_03_insert.phpt]<br />
FAIL SQLite3::query UPDATE tests [tests/sqlite3_04_update.phpt]<br />
FAIL SQLite3::query DELETE tests [tests/sqlite3_05_delete.phpt]<br />
FAIL SQLite3::prepare Bound Variable test [tests/sqlite3_06_prepared_stmt.phpt]<br />
FAIL SQLite3::prepare Bound Value test [tests/sqlite3_07_prepared_stmt.phpt]<br />
FAIL SQLite3::createFunction [tests/sqlite3_08_udf.phpt]<br />
FAIL SQLite3::prepare Bound Variable Blob test [tests/sqlite3_09_blob_bound_param.phpt]<br />
FAIL SQLite3::prepare Bound Value test [tests/sqlite3_10_bound_value_name.phpt]<br />
SKIP SQLite3::prepare number of rows [tests/sqlite3_11_numrows.phpt]<br />
FAIL SQLite3::query Unfinalized statement tests [tests/sqlite3_12_unfinalized_stmt_cleanup.phpt]<br />
FAIL SQLite3::query Skip all cleanup [tests/sqlite3_13_skip_all_cleanup.phpt]<br />
FAIL SQLite3::querySingle tests [tests/sqlite3_14_querysingle.phpt]<br />
=====================================================================<br />
Number of tests :   14                13<br />
Tests skipped   :    1 (  7.1%) --------<br />
Tests warned    :    0 (  0.0%) (  0.0%)<br />
Tests failed    :   13 ( 92.9%) (100.0%)<br />
Tests passed    :    0 (  0.0%) (  0.0%)<br />
---------------------------------------------------------------------<br />
Time taken      :    2 seconds<br />
=====================================================================</p>
<p>=====================================================================<br />
FAILED TEST SUMMARY<br />
---------------------------------------------------------------------<br />
SQLite3::open/close tests [tests/sqlite3_01_open.phpt]<br />
SQLite3::query CREATE tests [tests/sqlite3_02_create.phpt]<br />
SQLite3::query INSERT tests [tests/sqlite3_03_insert.phpt]<br />
SQLite3::query UPDATE tests [tests/sqlite3_04_update.phpt]<br />
SQLite3::query DELETE tests [tests/sqlite3_05_delete.phpt]<br />
SQLite3::prepare Bound Variable test [tests/sqlite3_06_prepared_stmt.phpt]<br />
SQLite3::prepare Bound Value test [tests/sqlite3_07_prepared_stmt.phpt]<br />
SQLite3::createFunction [tests/sqlite3_08_udf.phpt]<br />
SQLite3::prepare Bound Variable Blob test [tests/sqlite3_09_blob_bound_param.phpt]<br />
SQLite3::prepare Bound Value test [tests/sqlite3_10_bound_value_name.phpt]<br />
SQLite3::query Unfinalized statement tests [tests/sqlite3_12_unfinalized_stmt_cleanup.phpt]<br />
SQLite3::query Skip all cleanup [tests/sqlite3_13_skip_all_cleanup.phpt]<br />
SQLite3::querySingle tests [tests/sqlite3_14_querysingle.phpt]<br />
=====================================================================<br />
</code>
</div>
<p>Variations on that line appear about 20 times, it seems to be looking in a directory relative to the sqlite3-0.6 directory for the modules<br />
The lovely <a href="http://www.cyberspice.org.uk/">Cyberspice</a> has made an entry about this already<br />
<a href="http://www.cyberspice.org.uk/blog/2009/12/01/building-php-c-extensions-on-ubuntu-9-10/">building php c extensions on ubuntu 9.10</a><br />
unfortunately I didn&#8217;t see this until after I went my own, different route.<br />
Thanks to <a href="http://derickrethans.nl/">Derick</a> in <a href="irc://irc.efnet.org:6667/#php.pecl">#php.pecl</a> on <a href="http://www.efnet.org/">efnet</a> I came up with this bit of code<br />
<code><br />
TEST_PHP_EXECUTABLE=`which php` php /home/gabriel/sqlite3-0.6/run-tests.php /home/gabriel/sqlite3-0.6/tests/*.phpt<br />
</code><br />
which then outputs<br />
<a href='#' onclick="if ( document.getElementById('peclCut2').style.display=='none' ){document.getElementById('peclCut2').style.display='block';}else{document.getElementById('peclCut2').style.display='none';}return false;">Lots of output</a></p>
<div style='display:none' id='peclCut2'>
<code><br />
gabriel@daughterofseabiscuit:~/sqlite3-0.6$ TEST_PHP_EXECUTABLE=`which php` php /home/gabriel/sqlite3-0.6/run-tests.php /home/gabriel/sqlite3-0.6/tests/*.phpt</p>
<p>=====================================================================<br />
CWD         : /home/gabriel/sqlite3-0.6<br />
PHP         : /usr/bin/php<br />
PHP_SAPI    : cli<br />
PHP_VERSION : 5.2.4-2ubuntu5.9<br />
ZEND_VERSION: 2.2.0<br />
PHP_OS      : Linux - Linux daughterofseabiscuit.angelhosts.org 2.6.24-25-server #1 SMP Tue Oct 20 08:12:40 UTC 2009 i686<br />
INI actual  : /etc/php5/cli/php.ini<br />
More .INIs  : /etc/php5/cli/conf.d/ffmpeg.ini,/etc/php5/cli/conf.d/gd.ini,/etc/php5/cli/conf.d/mysql.ini,/etc/php5/cli/conf.d/mysqli.ini,/etc/php5/cli/conf.d/pdo.ini,/etc/php5/cli/conf.d/pdo_mysql.ini,/etc/php5/cli/conf.d/pdo_sqlite.ini,/etc/php5/cli/conf.d/snmp.ini,/etc/php5/cli/conf.d/sqlite.ini,/etc/php5/cli/conf.d/sqlite3.ini,/etc/php5/cli/conf.d/tidy.ini<br />
Extra dirs  :<br />
=====================================================================<br />
Running selected tests.<br />
PASS SQLite3::open/close tests [tests/sqlite3_01_open.phpt]<br />
PASS SQLite3::query CREATE tests [tests/sqlite3_02_create.phpt]<br />
PASS SQLite3::query INSERT tests [tests/sqlite3_03_insert.phpt]<br />
PASS SQLite3::query UPDATE tests [tests/sqlite3_04_update.phpt]<br />
PASS SQLite3::query DELETE tests [tests/sqlite3_05_delete.phpt]<br />
PASS SQLite3::prepare Bound Variable test [tests/sqlite3_06_prepared_stmt.phpt]<br />
PASS SQLite3::prepare Bound Value test [tests/sqlite3_07_prepared_stmt.phpt]<br />
PASS SQLite3::createFunction [tests/sqlite3_08_udf.phpt]<br />
PASS SQLite3::prepare Bound Variable Blob test [tests/sqlite3_09_blob_bound_param.phpt]<br />
PASS SQLite3::prepare Bound Value test [tests/sqlite3_10_bound_value_name.phpt]<br />
SKIP SQLite3::prepare number of rows [tests/sqlite3_11_numrows.phpt]<br />
PASS SQLite3::query Unfinalized statement tests [tests/sqlite3_12_unfinalized_stmt_cleanup.phpt]<br />
PASS SQLite3::query Skip all cleanup [tests/sqlite3_13_skip_all_cleanup.phpt]<br />
PASS SQLite3::querySingle tests [tests/sqlite3_14_querysingle.phpt]<br />
=====================================================================<br />
Number of tests :   14                13<br />
Tests skipped   :    1 (  7.1%) --------<br />
Tests warned    :    0 (  0.0%) (  0.0%)<br />
Tests failed    :    0 (  0.0%) (  0.0%)<br />
Tests passed    :   13 ( 92.9%) (100.0%)<br />
---------------------------------------------------------------------<br />
Time taken      :    4 seconds<br />
=====================================================================<br />
gabriel@daughterofseabiscuit:~/sqlite3-0.6$<br />
</code>
</div>
<p>So I&#8217;d chalk that up as a win, there might be things that get missed running it like this, but I&#8217;m not sure.<br />
You can either just run that line of code in the shell or have it in a bash script and then build the bash script to accept parameters so it becomes a lot more customisable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/unit-tests-for-pecl-extensions-and-how-to-make-them-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>istat server monitoring via iphone</title>
		<link>http://www.403.be/istat-server-monitoring-via-iphone/</link>
		<comments>http://www.403.be/istat-server-monitoring-via-iphone/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 11:42:38 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server admin]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[istat]]></category>
		<category><![CDATA[istatd]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[server monitoring]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.403.be/?p=57</guid>
		<description><![CDATA[So last night I decided that with my shiny new iPhone I was gonna check out a few apps for monitoring servers, obviously running my own server and a few VMs on it monitoring it is very important (but until now has basically been me checking top/free etc when I remember and getting an email [...]]]></description>
			<content:encoded><![CDATA[<p>So last night I decided that with my shiny new iPhone I was gonna check out a few apps for monitoring servers, obviously running my own server and a few VMs on it monitoring it is very important (but until now has basically been me checking top/free etc when I remember and getting an email if any vm doesn&#8217;t respond for a preset time).<br />
 I knew the company that produced istat pro (a mac os widget for monitoring your local system) had something so I decided to give that a try, cunningly named <a href="http://bjango.com/apps/istat/">istat</a>. £0.60 spent at the app store and I was sorted, it was easy enough to set up monitoring my mac book from the iphone when on the same wifi (it does it via bonjour) but a little trickier to setup the port forwarding on my airport base station (yes I&#8217;m an extreme Apple user now, but not an evangelist of Apple so I get to avoid the fanboi name tag, at least that&#8217;s what I tell myself). After checking I could still monitor my mac book via 3G it was time to move on to the servers.<br />
 Now the company the produces the istat monitoring app and istat pro (<a href="http://www.islayer.com/apps/">islayer</a> aka <a href="http://bjango.com/apps/">bjango</a>) doesn&#8217;t officially have a daemon for running on *nix, but some kind soul had created one which <a href="http://bjango.com/apps/">bjango</a> links to from their home page, called <a href="http://bjango.com/help/istat/istatserverlinux/">istatd</a> (istats daemon, geddit?) which is available via <a href="http://code.google.com/p/istatd/">google code</a>.<br />
 So, ssh into my experimental vm (running ubuntu 8.04 lts) that I use to try new stuff out on,<br />
<code><br />
wget http://istatd.googlecode.com/files/istatd-0.5.4.tar.gz<br />
tar xvzf istatd-0.5.4.tar.gz<br />
cd istatd-0.5.4<br />
./configure<br />
</code><br />
, ah, dependency, no problem<br />
<code><br />
sudo aptitude install libxml2-dev<br />
./configure<br />
</code><br />
 and it passes fine this time.<br />
<code><br />
sudo make<br />
sudo make install<br />
</code> and there we have it, all installed, the configure file by default goes in rather a bizarre place, so we do<br />
<code><br />
sudo nano /usr/local/etc/istat.conf<br />
</code><br />
and made it for my configuration look like this<br />
<code><br />
#<br />
# /etc/istat.conf: Configuration for iStat server<br />
#</p>
<p># network_addr           127.0.0.1<br />
# network_port           5109<br />
server_code              10293<br />
# server_user            istat<br />
# server_group           istat<br />
# server_socket          /tmp/istatd.sock<br />
# server_pid             /var/run/istat/istatd.pid<br />
# cache_dir              /var/cache/istat</p>
<p># Note: Only support for one network interface, limited by client.<br />
monitor_net              ( eth1 )</p>
<p># Array of disks to monitor. Specify mount path or device name.<br />
monitor_disk             ( / /home /usr /var /mnt/music )</p>
<p># Set to 1 if you want to use mount path as label instead of the device name.<br />
disk_mount_path_label    1</p>
<p># Try to probe the filesystem for disk label, will override the mount path label.<br />
disk_filesystem_label    1</p>
<p># Set custom disk label. Will override all other labels.<br />
# disk_rename_label        /dev/sda1  "root"<br />
# disk_rename_label        /home      "home"</p>
<p># End of file<br />
</code><br />
make sure you do this line so that you get a nice display of your mounted points<br />
<code>disk_mount_path_label    1</code></p>
<p>Now unfortunately there&#8217;s no standard init script for it, so atm it gets started with<br />
<code> sudo istatd &#038;</code><br />
though I&#8217;ll probably knock one together at some point and there we have it, all nicely done and monitoring the vm, it doesn&#8217;t monitor temps or fan speeds atm but hopefully sometime it will, here&#8217;s an image of it monitoring the vm this blog is on<br />
<div id="attachment_60" class="wp-caption alignnone" style="width: 330px"><a href="http://www.403.be/istat-server-monitoring-via-iphone/photo/" rel="attachment wp-att-60"><img src="http://www.403.be/blog/wp-content/uploads/2009/11/photo.jpg" alt="istat monitoring istatd on 403.be" title="istat monitoring istatd on 403.be" width="320" height="480" class="size-full wp-image-60" /></a><p class="wp-caption-text">istat monitoring istatd on 403.be</p></div></p>
<p>I&#8217;m going to try installing it onto my SuSe vm this evening, so I&#8217;ll update this post with how that goes as well as any init script I come up with.</p>
<p>btw if you don&#8217;t know how to grab a screen shot of your iphone, hold the home key and press the sleep key at the top, a flash of white later and it&#8217;s saved on your film roll.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/istat-server-monitoring-via-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP and PECL Extensions on Snow Leopard</title>
		<link>http://www.403.be/php-and-pecl-extensions-on-snow-leopard/</link>
		<comments>http://www.403.be/php-and-pecl-extensions-on-snow-leopard/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 16:57:05 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[runkit]]></category>

		<guid isPermaLink="false">http://www.403.be/?p=51</guid>
		<description><![CDATA[This is a quick post that I could possibly come back and improve later
This is based on something being in a users home dir/sites/ directory.
Although it doesn&#8217;t really matter for a cli script
So we have
/Users/gabriel
/Users/gabriel/Sites
/etc/apache2/users/gabriel.conf
is the conf file for the vhost in your user dir which you shouldn&#8217;t really have to worry about, but always [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick post that I could possibly come back and improve later</p>
<p>This is based on something being in a users home dir/sites/ directory.<br />
Although it doesn&#8217;t really matter for a cli script<br />
So we have<br />
/Users/gabriel<br />
/Users/gabriel/Sites<br />
/etc/apache2/users/gabriel.conf<br />
is the conf file for the vhost in your user dir which you shouldn&#8217;t really have to worry about, but always good to know where it is.</p>
<p><code>sudo nano /etc/apache2/httpd.conf</code></p>
<p>uncomment the php line that is found in here, I also uncommented the fastcgi line after it for kicks</p>
<p><code>sudo apachectl restart</code></p>
<p>And that&#8217;s you sorted for php on apache, note this is php5.3 on apache 2.2.13</p>
<p>For this I&#8217;m installing the runkit PECL extension &#8220;For all those things you&#8230;. probably shouldn&#8217;t have been doing anyway&#8230;.&#8221;<br />
We need to install the sex that is xcode, grab the latest one from the Apple Developer Connection website http://developer.apple.com/tools/xcode/</p>
<p>We have svn installed already so grab a copy of it, http://svn.php.net/repository/pecl/runkit/trunk/ is the repo and http://svn.php.net/viewvc/pecl/runkit/trunk/ is the fancy human readable version</p>
<p><code>svn checkout http://svn.php.net/repository/pecl/runkit/trunk runkit<br />
cd runkit<br />
phpize<br />
./configure<br />
sudo make<br />
sudo make install</code></p>
<p>and we&#8217;re nearly done!<br />
I couldn&#8217;t find a default php.ini and a simple phpinfo(); seems to indicate there isn&#8217;t one, so we:</p>
<p><code>sudo cp /etc/php.ini.default /etc/php.ini<br />
sudo nano /etc/php.ini</code></p>
<p>find the long list of commented out modules<br />
and add </p>
<p><code>extension=runkit.so</code></p>
<p>Quit and save and</p>
<p><code>sudo apachectl restart</code></p>
<p>you don&#8217;t really need todo that since you&#8217;re probably using it in cli but it&#8217;s fun to do anyway</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/php-and-pecl-extensions-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Dojo Decorators</title>
		<link>http://www.403.be/zend-dojo-decorators/</link>
		<comments>http://www.403.be/zend-dojo-decorators/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:18:37 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[dojo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[decorators]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.403.be/?p=38</guid>
		<description><![CDATA[I&#8217;ve been having some trouble getting zend decorators to change the way a form layout displays on the page, by default zend likes to display it&#8217;s forms like this
&#60;form&#62;
&#60;dl&#62;
&#60;dt&#62;Label&#60;/dt&#62;&#60;dd&#62;&#60;input type=&#8230;&#62;&#60;/dd&#62;
&#60;dt&#62;Label&#60;/dt&#62;&#60;dd&#62;&#60;input type=&#8230;&#62;&#60;/dd&#62;
&#60;dt&#62;Label&#60;/dt&#62;&#60;dd&#62;&#60;input type=&#8230;&#62;&#60;/dd&#62;
&#60;/dl&#62;
&#60;/form&#62;
and I wished them to be more div-y.
Unfortunately due to the complex ways of them creating horizontal sliders this wasn&#8217;t usual, so I decided [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having some trouble getting zend decorators to change the way a form layout displays on the page, by default zend likes to display it&#8217;s forms like this</p>
<p>&lt;form&gt;<br />
&lt;dl&gt;<br />
&lt;dt&gt;Label&lt;/dt&gt;&lt;dd&gt;&lt;input type=&#8230;&gt;&lt;/dd&gt;<br />
&lt;dt&gt;Label&lt;/dt&gt;&lt;dd&gt;&lt;input type=&#8230;&gt;&lt;/dd&gt;<br />
&lt;dt&gt;Label&lt;/dt&gt;&lt;dd&gt;&lt;input type=&#8230;&gt;&lt;/dd&gt;<br />
&lt;/dl&gt;<br />
&lt;/form&gt;</p>
<p>and I wished them to be more div-y.<br />
Unfortunately due to the complex ways of them creating horizontal sliders this wasn&#8217;t usual, so I decided to settle for a table, tr and tds, because of the strange way we&#8217;re doing the form (we start with the form hidden and reveal each question as the previous one passes validation (zend&#8217;s validators for the appearence and some custom ones before revealing the next question, stored in a hidden field)) this was actually quite tricky, especially when we had questions that didn&#8217;t need answering, so they needed to pass validation before they were even focused on so that the next field would be revealed until the time that a required question was met. It would have been a lot easier to have all the voluntary questions in one block at the end or beginning but the order of the questions was important.</p>
<p>So in the way of the decorators we have<br />
$decoratorsOpen = array(<br />
&#8216;DijitElement&#8217;,<br />
&#8216;Errors&#8217;,<br />
array(array(&#8216;data&#8217; =&gt; &#8216;HtmlTag&#8217;), array(&#8216;tag&#8217; =&gt; &#8216;td&#8217;)),<br />
array(&#8216;Label&#8217;, array(&#8216;tag&#8217; =&gt; &#8216;td&#8217;)),<br />
array(array(&#8216;row&#8217; =&gt; &#8216;HtmlTag&#8217;), array(&#8216;tag&#8217; =&gt; &#8216;tr&#8217;, &#8216;openOnly&#8217;=&gt;&#8217;true&#8217;, &#8216;class&#8217; =&gt; &#8216;hiddenToReveal&#8217;, &#8217;style&#8217; =&gt; &#8216;display:none;padding:auto;&#8217;, &#8216;id&#8217; =&gt; $IDName.&#8217;TR&#8217;)),<br />
);<br />
Fairly easy, we ignore DijitElements (because they tend to be a bit complex for our generic decorator) and errors, we find the elements regarde as data and chuck em in a td, same with the labels, we then suround the group in a tr, but with &#8216;openOnly&#8217;=&gt;&#8217;true&#8217; this means the tr only gets open and we can tack some more elements into the same tr. Set the trs class, some styling and the id of the tr, this is what gets used to identify the element to be revealed.<br />
And then we add in a hidden element that contains the validation regex and close the tags with a similar decorator except with &#8216;closeOnly&#8217;=&gt;&#8217;true&#8217;.</p>
<p>After all that we define some js to check the current element (onfocus, onkeyup etc) and validate and then get all the elements of class hiddenToReveal, loop through till they find the element whos predecessor is the one we just validated and reveal it to the world! (dojo.fx.wipeIn ftw)</p>
<p>One of the noticable things about dojo is their lovely tooltips, unfortunately they don&#8217;t always work with each element, for example datetextbox extends validationtextbox, validationtextbox has a promptmessage method for doing the tooltip, datetextbox can use this method without Eclipse or PHP complaing, but it just doesn&#8217;t display the tooltip, so we have genrerate them seperatly and add them ignoring promptmessage.</p>
<p>This might break mvc but I&#8217;m not sure:</p>
<p>In the view<br />
foreach( $this-&gt;TooltipArray as $elementId =&gt; $tt){<br />
echo $this-&gt;tooltip(<br />
$elementId.&#8221;TT&#8221;,<br />
null,<br />
array(&#8216;connectId&#8217; =&gt; $elementId, &#8216;label&#8217; =&gt; $tt ));}<br />
And all we do is pass it an array of ['elementId']=&#8217;tooltip&#8217;, the tooltip itself has an id elementIdTT, the tooltip is connected to elementId and the tooltip has the value \o/</p>
<p>Now I get the fun of doing serverside validation and playing with dojo.xhr to submit the data. <img src='http://www.403.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/zend-dojo-decorators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>She lives!</title>
		<link>http://www.403.be/she-lives/</link>
		<comments>http://www.403.be/she-lives/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 08:16:04 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[GoMAD thinking]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[decorators]]></category>
		<category><![CDATA[dmu]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.403.be/blog/?p=26</guid>
		<description><![CDATA[I haven&#8217;t posted in a while, I&#8217;ve just started my University placement and am currently working for GoMAD thinking designing an online coaching tool using the Zend Framework and Dojo. It&#8217;s quite different learning to use php in a proper MVC way, even trickier learning to work with Zend to get around it&#8217;s interesting little [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in a while, I&#8217;ve just started my University placement and am currently working for <a title="GoMAD Thinking" href="http://www.gomadthinking.com/" target="_blank">GoMAD thinking</a> designing an online coaching tool using the <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> and <a title="Dojo" href="http://www.dojotoolkit.org/" target="_blank">Dojo</a>. It&#8217;s quite different learning to use <a href="http://www.php.net/" target="_blank">php</a> in a proper <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC</a> way, even trickier learning to work with Zend to get around it&#8217;s interesting little foibles. I decided to resurrect this blog and use it as a kind of dev blog, charting the pitfalls and solutions I&#8217;ve encountered on my journey, I also plan to explain a bit more about the company and the location we&#8217;re working in.</p>
<p>We work currently on our own laptops that the company provides, we have stands to put them in and keyboards and mices to attach, no external monitors so I&#8217;m very glad I managed to get a new one with a decent screen, a toshiba Satellite Pro A300, it originally came with Windows Vista Business in and I&#8217;ve left that on here but I&#8217;ve also installed <a href="http://www.ubuntu.com/" target="_blank">Ubuntu 9.04</a> which seems to be working well.</p>
<p>I&#8217;m developing using the latest eclipse from source for php developers and the standard php/Apache that comes on the Ubuntu repos (5.2.6 and 2.2.11)</p>
<p>I&#8217;m working with Gavin a fellow student from DMU and Antonios, a DMU PhD student working towards a doctorate in fuzzy logic style.</p>
<p>I&#8217;m currently working on a <a href="http://en.wikipedia.org/wiki/SMART_criteria" target="_blank">SMART goals</a> defining webpage, generating questions from a db, using dojox.fx to hide and reveal questions as and when they become active. Having a little trouble with decorators at the moment and I&#8217;m waiting for a reply on nabble, Matthew Weier O&#8217;Phinney has helped me via nabble so far and hopefully we can get this sorted today.</p>
<p>I&#8217;m really enjoying working here so far, and learning to use Zend/MVC helps lots to keep me interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/she-lives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow! G1!</title>
		<link>http://www.403.be/snow-g1/</link>
		<comments>http://www.403.be/snow-g1/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 09:30:08 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[G1]]></category>
		<category><![CDATA[snow]]></category>

		<guid isPermaLink="false">http://www.403.be/blog/?p=16</guid>
		<description><![CDATA[Yay it&#8217;s snowing, and as I was walking to Uni I thoguht I&#8217;d take some pics using my G1, they&#8217;re a bit blurry, the G1 takes it&#8217;s time taking photos, but here they are anyway.


]]></description>
			<content:encoded><![CDATA[<p>Yay it&#8217;s snowing, and as I was walking to Uni I thoguht I&#8217;d take some pics using my G1, they&#8217;re a bit blurry, the G1 takes it&#8217;s time taking photos, but here they are anyway.</p>
<p><a href="http://www.403.be/jpg/snow1.jpg"><img class="alignnone size-medium wp-image-18" title="1233562778343" src="http://www.403.be/jpg/snow1.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.403.be/jpg/snow2.jpg"><img class="alignnone size-medium wp-image-17" title="1233515181290" src="http://www.403.be/jpg/snow2.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/snow-g1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Store Staff and the Heroin trade</title>
		<link>http://www.403.be/apple-store-staff-and-the-heroin-trade/</link>
		<comments>http://www.403.be/apple-store-staff-and-the-heroin-trade/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 00:50:09 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.403.be/blog/?p=12</guid>
		<description><![CDATA[I wrote this a few days ago and completely forgot to publish it.
I had some spare time yesterday and so instead of sitting geeking online all day I decided to head out and investigate The World. The shopping centre in town has been expanded and renovated so I went on a tour and to see [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this a few days ago and completely forgot to publish it.</p>
<p>I had some spare time yesterday and so instead of sitting geeking online all day I decided to head out and investigate The World. The shopping centre in town has been expanded and renovated so I went on a tour and to see if I can find pretty clothes for myself. I found some nice jeans I might buy in a couple of weeks but the real reason for going was to pop into the Apple store and have a play. The new Mac books look nice, not that horrid shiney plastic crap they used to be We use the white plastic iMacs at Uni, but the new ones seem to be a nice shiney alu, so might have to nab one of them. I really do think the people at the Apple store have to be on some form of heroin, they&#8217;re perpetually happy and bouncy, not once whilst I was cruising amongst the throngs of people in there did I see anything other than beaming smiles and happy thoughts. They&#8217;ve had a nice refresh of some of the apple stock as I mentioned above, the Mac Books look nice, iPod nano is quite nice looking too, although I might by a shuffle, they&#8217;re kinda neat but I wish they had more space.</p>
<p>G&#8217;night readers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/apple-store-staff-and-the-heroin-trade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpBB2 and the futility of package management</title>
		<link>http://www.403.be/phpbb2-and-the-futility-of-package-management/</link>
		<comments>http://www.403.be/phpbb2-and-the-futility-of-package-management/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 17:46:30 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.403.be/blog/?p=8</guid>
		<description><![CDATA[So since we moved Hidden Agenda&#8217;s website off the old rented website and onto the lovely new colod server there hasn&#8217;t been a forum available, mostly through my own laziness. So yesterday after discussing it with Ben I decided to get it installed again and let him get on with it. I&#8217;d already had a [...]]]></description>
			<content:encoded><![CDATA[<p>So since we moved Hidden Agenda&#8217;s website off the old rented website and onto the lovely new colod server there hasn&#8217;t been a forum available, mostly through my own laziness. So yesterday after discussing it with Ben I decided to get it installed again and let him get on with it. I&#8217;d already had a few problems with apt/aptitude on our home server trying to get transcoding working for fruppes etc (finally given up and returning it to windows/tvaversity so I approached this with some trepidation. After apt-cache searching I found that the only version available was phpBB2 which is approximately 2000-2! I decided sod it and install that version anyway for simplicities sake. Unfortunately the version in the repo for Hardy is somewhat fucked and wont actually install, a quick Google turns up a known bug and a fix, sod that. If I&#8217;m not installing from the repo I might as well not bother with Yea Olde version and just nab the source for phpBB3, 5 minutes later and bang, all sorted, it took longer to try and install v2, find the fix and decide not to bother than it did to install v3 from source! I am determined one day just to give up on repository stuff and go straight for building everything from source and on slackware. But eh, I&#8217;m far far too lazy todo that, so I&#8217;ll stick with broken, out of date repository stuff and enjoy bitching about it.<br />
2 weeks till student loans, I&#8217;ve already ear marked most of my money:</p>
<ul>
<li>new server and collocation (thinking Dell R200/300 or possibly home grown, I don&#8217;t really need advanced RAID on it. I plan on 2 hard drives, non-RAID, 1 as the work horse hosting the vms etc and then using the other as a backup.</li>
<li>new laptop, I really want a nice thin one, still torn between a Mac Air or a new EEE 1000. I don&#8217;t want a giant 17inch monstrosity but maybe a 15 inch Mac Book. I&#8217;ve been looking  lot at the refurbished Macs they sell on their site, same warrenty as a brand new Mac but discounted and with the possibility of slight cosmetic injury.</li>
<li>a new PC. Since I blew the last one when it was connected to Dave&#8217;s single stage I need a new one, I haven&#8217;t really missed gaming that much tbh so I might consider having a Mac for my main PC and triple booting MacOS/Ubuntu/Windows. Of course if I get an expensive Mac laptop I&#8217;ll be having to use that as my main pc and just connect it to monitors when using it at home. But we shall see.</li>
</ul>
<p>Ofcourse I&#8217;ll change my mind about this all completely tomorrow, but it&#8217;s fun to speculate&#8230; <img src='http://www.403.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m still getting headaches :/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/phpbb2-and-the-futility-of-package-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standards? Me? No thanks!</title>
		<link>http://www.403.be/standards-me-no-thanks/</link>
		<comments>http://www.403.be/standards-me-no-thanks/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 02:14:33 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.403.be/blog/?p=6</guid>
		<description><![CDATA[So after finally getting a fair bit of the mod_rewrite and general hacking of wordpress needed to make it all fit in nice and neat with the rest of the site I started thinking about the rss feed icon. This lil image has been around a while and was quite boring and didn&#8217;t really fit [...]]]></description>
			<content:encoded><![CDATA[<p>So after finally getting a fair bit of the mod_rewrite and general hacking of wordpress needed to make it all fit in nice and neat with the rest of the site I started thinking about the rss feed icon. This lil image has been around a while and was quite boring and didn&#8217;t really fit in where it was placed: in the iframe below the blog_name text. So I went off on a wander around the webness searching for different and possibly interesting icons to use instead of the b(l)og standard one. Lo and behold I found this neat little chap, one of a pair infact on this here <a href="http://hughmcguire.net/2008/01/18/feed-icons/">blogwebsitething</a>. A little editing in Gimp later and we have this neat little chap, comment out the code for the rssfeed in the blog itself and add it to the main site and tah dah. Now he looks very cute but the rest of my site didn&#8217;t really match, going from the plain black&#038;white of the original to beige/brown/black of the newer one really made me think about the lack of &#8220;decent&#8221; colour schemes used in most peoples websites. Anywho I wanted my little RSS chap, who I shall name Bob, to feel relaxed and fit in so I thought I&#8217;d try and mod the text on the pages to fit in with the colour, unfortunately this didn&#8217;t really work and most of the text became unreadable. So I decided what the hey and tried changing the back ground of the site to fit in with, and I think it looks much, much better this way, I may change the colour of the iframe stuff when I get round to it, but I think it looks quite groovey atm. So here it is, 3am and I&#8217;m waiting up for my incomings to appear so I can scrape ome def together for them whilst firefox is busy telling me I&#8217;ve spelt &#8220;colour&#8221; incorrectly and me verbalising at it to bog off. I&#8217;ve run out of beer but the pepsi stocks remain intact, I&#8217;ve got massive attack on the ipod, half a packet of cigerettes and I&#8217;m wearing sunglasses. I like my life <img src='http://www.403.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
    Join me tomorrow for the fun and frollocks of installing phpbb3 when ubuntu&#8217;s repositry version of phpbb2 is severely fucked in the ass.<br />
Gnight all, stay funky.</p>
<p>P.S. trying to type this on an EEE whilst it&#8217;s within the iframe is endless fun <img src='http://www.403.be/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/standards-me-no-thanks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_rewrite and the death of my sanity</title>
		<link>http://www.403.be/mod_rewrite-and-the-death-of-my-sanity/</link>
		<comments>http://www.403.be/mod_rewrite-and-the-death-of-my-sanity/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 14:14:59 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.403.be/blog/?p=3</guid>
		<description><![CDATA[So I decided temporarily to forgoe finishing the site in order to setup wordpress and attempt my first use of mod_rewrite to integrate the blog with the rest of my site, I had to choose a theme for wordpress that only consisted of one column in order to fit it in nicely with the iframe [...]]]></description>
			<content:encoded><![CDATA[<p>So I decided temporarily to forgoe finishing the site in order to setup wordpress and attempt my first use of mod_rewrite to integrate the blog with the rest of my site, I had to choose a theme for wordpress that only consisted of one column in order to fit it in nicely with the iframe (I hate iframes but eh). This all seemed to go fine and I managed to get mod_rewrite to integrate internal links into the iframe I use.<br />
Unfortunately trying to abuse mod_rewrite to accept a url as a parameter and put this as the source of the iframe doesn&#8217;t seem to work, it strips the http:/ off the front of the url and thus tries to access it as if it was local. I managed todo an ugly hack like this: RewriteRule ^links/http:/(.+)$ index.php?iframe=http://$1 [L] to make it work. I&#8217;m guessing something like // escapes the slash and thus only one is found. All seems to be working now, so yay.</p>
<p>Now to get back to coding ircbots to stalk people.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.403.be/mod_rewrite-and-the-death-of-my-sanity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
