<?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>Searbe</title>
	<atom:link href="http://www.searbe.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.searbe.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 19 Aug 2010 12:29:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Add Custom Tab Auto-Completion to your Bash Scripts</title>
		<link>http://www.searbe.co.uk/add-custom-tab-auto-completion-to-your-bash-scripts</link>
		<comments>http://www.searbe.co.uk/add-custom-tab-auto-completion-to-your-bash-scripts#comments</comments>
		<pubDate>Thu, 19 Aug 2010 12:29:33 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=119</guid>
		<description><![CDATA[Recently I joined in the office crazy with shoving little methods in my bash ~/.profile &#8230; to complete the laziness I added tab auto-completion.
Create a method that generates the tab options then use &#8220;complete&#8221; to assign it to your custom method(s):

# a method which returns all my project dirs via COMPREPLY - note the use [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I joined in the office crazy with shoving little methods in my bash ~/.profile &#8230; to complete the laziness I added tab auto-completion.</p>
<p>Create a method that generates the tab options then use &#8220;complete&#8221; to assign it to your custom method(s):</p>
<pre>
# a method which returns all my project dirs via COMPREPLY - note the use of
# compgen and ls /clients within backticks, that's where you want to do
# your own thang
function _clientdirs()
{
        local curw
        COMPREPLY=()
        curw=${COMP_WORDS[COMP_CWORD]}
        COMPREPLY=($(compgen -W '`ls /clients`' -- $curw))
        return 0
}

# my 'q' shortcut method to run a queue script in one of my projects
function q()
{
        if [ $# -eq 1 ]
        then
                php /clients/$1/core/tools/run_queue.php local
        else
                php core/tools/run_queue.php local
        fi
}

# assigning the complete method to my method
complete -F _clientdirs -o dirnames q</pre>
<p>Perhaps you&#8217;re looking at this thinking &#8220;why did you do it like that?&#8221; &#8230; in which case, tell me how I should&#8217;ve done it <img src='http://www.searbe.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/add-custom-tab-auto-completion-to-your-bash-scripts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bioshock 2 Won&#8217;t Launch / Seculaunch 2000 Error</title>
		<link>http://www.searbe.co.uk/bioshock-2-wont-launch-seculaunch-2000-error</link>
		<comments>http://www.searbe.co.uk/bioshock-2-wont-launch-seculaunch-2000-error#comments</comments>
		<pubDate>Sat, 13 Feb 2010 23:31:30 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=113</guid>
		<description><![CDATA[Today I&#8217;ve spent the last couple of hours getting Bioshock 2 working. This is the steam version, but these fixes will likely apply to all versions (retail, steam, etc).
(Steam-only) Bioshock 2 Stuck on Preparing to Launch
If you&#8217;re running steam, you double click Bioshock 2 to get it running, and nothing happens, there could be a [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve spent the last couple of hours getting Bioshock 2 working. This is the steam version, but these fixes will likely apply to all versions (retail, steam, etc).</p>
<h2>(Steam-only) Bioshock 2 Stuck on Preparing to Launch</h2>
<p>If you&#8217;re running steam, you double click Bioshock 2 to get it running, and nothing happens, there could be a bunch of issues.</p>
<p>Firstly it might be that SecuROM hasn&#8217;t activated the game properly, in which case right-click on Bioshock 2, click View CD Key, right click the key and copy it to clipboard, then browse to &#8220;C:\Program Files\Steam\steamapps\common\bioshock 2\SP\Builds\Binaries&#8221;. </p>
<p>Double click on Bioshock2Launcher and, if you need to activate, you&#8217;ll be asked for the CD key here. Paste it in and activate.</p>
<p>For me, the problems didn&#8217;t stop here.</p>
<h2>Seculaunch 2000 Error</h2>
<p>This seems to be something to do with Visual Studio 2005 Redistributables. Go to Start -> Control Panel -> Add/Remove and remove any &#8220;Microsoft Visual Studio 2005 Redistributable&#8221; entries. Then run this stupid little FixIt program from Microsoft: http://go.microsoft.com/?linkid=9646979</p>
<p>Now restart your PC and reinstall the distributables by running &#8220;vcredist_x86.exe&#8221;, which you&#8217;ll find on the CD or at &#8220;C:\Program Files\Steam\steamapps\common\bioshock 2\Support&#8221;.</p>
<h2>xlive.dll not found</h2>
<p>Now you need to install games for windows live. Go to your CD or to &#8220;C:\Program Files\Steam\steamapps\common\bioshock 2\Support\GFWL&#8221;. If you&#8217;re running Windows XP, install that hotfix. Then run gfwlivesetup.exe.</p>
<h2>Create a new shortcut in Steam to Bioshock 2</h2>
<p>Now, I&#8217;ve no idea what Steam&#8217;s trying to do, but I can confidently say it&#8217;s completely failing. Steamfail. So to fix whatever they&#8217;ve messed up, click on Games -> Add Non-Steam Game to My games list -> Browse &#8230; , then browse to C:\Program Files\Steam\steamapps\common\bioshock 2\SP\Builds\Binaries and seelct Bioshock2Launcher. Click Open then click Add selected programs. Now you&#8217;ll have &#8220;Bioshock2Launcher&#8221; in your My games list. Right-click it, click Properties and change Bioshock2Launch in the top box to &#8220;BioShock 2 (fixed)&#8221; or something. Then click Close. Now, whenever you want to play BioShock 2, you&#8217;ll need to click on this &#8220;Fixed&#8221; shortcut.</p>
<h2>Finished?</h2>
<p>Hopefully, you&#8217;ll now be able to run Bioshock 2. I thought steam was supposed to make this stuff easy. Instead, I spend hours installing, reinstalling, and all sorts of rubbish to get the bloody game working &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/bioshock-2-wont-launch-seculaunch-2000-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 Lamp &#8211; Use Ubuntu and VirtualBox for a Great PHP Development Environment</title>
		<link>http://www.searbe.co.uk/windows-7-lamp-virtualbox-ubuntu-php</link>
		<comments>http://www.searbe.co.uk/windows-7-lamp-virtualbox-ubuntu-php#comments</comments>
		<pubDate>Sun, 27 Dec 2009 00:38:54 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=88</guid>
		<description><![CDATA[I&#8217;ve just spent today making myself feel incredibly bad for switching back to Windows, but of course, I still need Linux for my web development stuff &#8211; you can&#8217;t beat a good LAMP and without it, Windows 7 can&#8217;t be my primary operating system. Sorry, but PHP on Windows 7 still doesn&#8217;t compare to PHP [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent today making myself feel incredibly bad for switching back to Windows, but of course, I still need Linux for my web development stuff &#8211; you can&#8217;t beat a good LAMP and without it, Windows 7 can&#8217;t be my primary operating system. Sorry, but PHP on Windows 7 still doesn&#8217;t compare to PHP on Linux!</p>
<h2>Install Virtualbox</h2>
<p>So my install is Windows 7 with an Ubuntu virtual server using VirtualBox. All of my work sits on my windows partition &#8211; so native Windows apps aren&#8217;t fiddling around with files on a VM &#8211; and Ubuntu takes all requests and serves up pages from the windows partition. First step: <a href="http://www.virtualbox.org/">Download</a> and install VirtualBox.</p>
<h2>Get an Ubuntu LAMP set up</h2>
<p>If you&#8217;re not familiar with VirtualBox, you need to create a new machine. VirtualBox will take you through a wizard which you should be able to figure out yourself &#8211; you don&#8217;t need much in the way of disc space etc. Head over to <a href="http://www.ubuntu.com/getubuntu/download">Ubuntu</a> and grab yourself an ISO if you haven&#8217;t already. Once you have the an Ubuntu (or whatever other distro) desktop sitting in front of you, you might want to follow my <a href="http://www.searbe.co.uk/ubuntu-904-lamp-apache-php-mysql-phpmyadmin-windows-fonts-playonlinux#content">lamp guide</a> to get a few bits installed &#8211; namely Apache, PHP, MySQL and XDebug.</p>
<h2>Add VirtualBox Shared Folders</h2>
<p>Once it&#8217;s set up, power your virtual machine off and open VirtualBox. Click the VM (your virtual machine, in my case I called it &#8216;ubuntu&#8217;) then click Settings and click &#8216;Shared Folders&#8217;. Add a shared folder from your Windows drive &#8211; this will contain all of your shared stuff. You can do multiple shares if you like &#8211; personally, I like to just have a single shared folder and treat it more like a drop-box than have to configure multiple shares.</p>
<h2>Install VirtualBox Guest Additions</h2>
<p>Once that&#8217;s done, start up your VM. You will need to install Guest Additions if you haven&#8217;t already. You can do this by clicking &#8216;Devices&#8217; at the top of your running VM then clicking &#8216;install guest additions&#8217;. This will mount a CD, in which there is a .sh shell script which you should execute (run &#8220;./scriptname.sh&#8221; in terminal).</p>
<h2>Mount your Shared Directories in the Ubuntu Virtual Machine</h2>
<p>Now, in your running VM, make a directory somewhere. I decided to be a bit messy and just create /development (mkdir /development). This is where the contents of your shared folder will go when you mount it.</p>
<p>The command to mount the shared folder is <strong>sudo mount -t vboxsf development /development</strong> &#8211; where &#8220;development&#8221; is the name you specified when you created the shared folder in the first place in VirtualBox, and &#8220;/development&#8221; is the directory you just created in the Virtual Machine.</p>
<p>It&#8217;s a little annoying having to run this in the terminal each time the VM boots up &#8211; so what I did is stick it at the end of /etc/rc.local, just before exit 0. rc.local is a script that&#8217;s run just at the end of startup, so an ideal place for you to shove stuff like this in.</p>
<p>Before that works, you&#8217;ll want to edit /etc/sudoers (sudo nano /etc/sudoers) and add a line like this:</p>
<p>%craig ALL = NOPASSWD: ALL</p>
<p>(Change &#8216;craig&#8217; to your user&#8217;s group)</p>
<h2>Configure VirtualBox Port Forwarding</h2>
<p>Great, nearly there. You have a LAMP setup, you have a shared folder without any SAMBA rubbish, but you can&#8217;t access your LAMP from Windows!</p>
<p>Don&#8217;t go and set up a bridged network &#8211; there&#8217;s a better solution; VirtualBox&#8217;s port forwarding. You want to make every request to port 80 of your PC forward to the VirtualBox guest.</p>
<p>Open a command prompt in Windows and change directory to wherever VirtualBox is installed &#8211; in my case, C:\Program Files\Sun\VirtualBox.</p>
<p>Take note of what your VM is called. Mine is called Ubuntu. If it has a space in the name, you&#8217;ll need to wrap it in &#8220;double quotes&#8221; in the following commands.</p>
<p>My Virtual Machine uses a pcnet adapter &#8211; others talk about e1000 &#8211; you may need to tweak as necesarry, but unfortunately I don&#8217;t know the abbreviated names for the other adapters. Let&#8217;s just presume your Virtual Machine uses a pcnet adapter.</p>
<p>Run this to have every request to port 80 on your host (Windows 7) forward to port 80 on your guest (the Ubuntu VM).</p>
<p>VBoxManage.exe setextradata Ubuntu &#8220;VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/HostPort&#8221; 80<br />
VBoxManage.exe setextradata Ubuntu &#8220;VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/GuestPort&#8221; 80<br />
VBoxManage.exe setextradata Ubuntu &#8220;VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/Protocol&#8221; TCP</p>
<p>Run the following and the extra data you just set should be spat back at you, just to confirm the settings are all in there okay:</p>
<p>VBoxManage.exe getextradata Ubuntu enumerate</p>
<h2>Configure VirtualBox Host-Only Adapter</h2>
<p>Now we need to add a second network adapter so we have a permanent IP address to your Windows host. Power your Ubuntu VM down, edit the network adapters and enable the second adapter. Choose &#8216;Attached to: host-only adapter&#8217;.</p>
<p>Now you have an &#8220;internal networ&#8221; between Ubuntu and Windows. In VirtualBox, go to File->Settings->Network and click the configure icon for the host-only adapter. You&#8217;ll see an IP address &#8211; default is 192.168.56.1. This is your Windows PC&#8217;s &#8220;internal network&#8221; IP &#8211; so anywhere you need a permanent handle to your host, use this IP.</p>
<p>Now you have a Windows 7 irrtitance (bug?) to fix: go to Run, and enter secpol.msc. Click Network List Manager Policies, then double click Unidentified Networks, and check the circle to have unidentified networks always classed as private. This will make unidentified networks use your private firewall rules, which will likely be a be more relaxed ruleset. If you don&#8217;t do this, you might have trouble getting Ubuntu to talk to Windows 7 on this &#8220;internal network&#8221;.</p>
<h2>Configure XDebug</h2>
<p>Okay now for XDebug. Jump back in to your Ubuntu VM and ensure your xdebug config file (probably at /etc/php5/apache/conf.d/xdebug.ini) has this:</p>
<p>xdebug.remote_enable=on<br />
xdebug.remote_handler=dbgp<br />
xdebug.remote_host=[your HOST machines permanent IP on the host-only adapter, 192.168.56.1 in my case]<br />
xdebug.remote_port=9000<br />
xdebug.idekey=netbeans-xdebug</p>
<p><strong>IMPORTANT</strong> It seems that somehow this setup will now *ONLY* work if you have an xdebug session running, otherwise you get an infinite hang where it seems XDebug is trying to connect to a client (?!). So comment out the first line by putting a semi-colon in front of it:</p>
<p>;xdebug.remote_enable=on</p>
<p>And only un-comment it when you want to run a debug session. Not great but I can&#8217;t find another solution <img src='http://www.searbe.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  Please comment if you know of a better way.</p>
<h2>Finished!</h2>
<p>Right &#8211; now restart VirtualBox and, hopefully, you will be all set up with a Linux development machine inside a Windows development environment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/windows-7-lamp-virtualbox-ubuntu-php/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Acer 3000, 3020, 5020 Windows 7 Drivers &amp; Windows Vista Drivers</title>
		<link>http://www.searbe.co.uk/acer-3000-3020-5020-windows-7-windows-vista-drivers</link>
		<comments>http://www.searbe.co.uk/acer-3000-3020-5020-windows-7-windows-vista-drivers#comments</comments>
		<pubDate>Sat, 26 Dec 2009 13:41:18 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=84</guid>
		<description><![CDATA[Acer apparently &#8220;dont support&#8221; Windows 7 or Windows Vista drivers on my Acer 3020. After spending a while browsing around for drivers, I found Acer 3020 Vista drivers. With Vista not being very different to Windows 7, I thought I&#8217;d give them a go, and they worked!
What&#8217;s weird is Acer doesn&#8217;t list any drivers under [...]]]></description>
			<content:encoded><![CDATA[<p>Acer apparently &#8220;dont support&#8221; Windows 7 or Windows Vista drivers on my Acer 3020. After spending a while browsing around for drivers, I found <strong>Acer 3020 Vista drivers</strong>. With Vista not being very different to Windows 7, I thought I&#8217;d give them a go, and they worked!</p>
<p>What&#8217;s weird is Acer doesn&#8217;t list any drivers under the support sections on their website &#8211; as a matter of fact, they have a &#8216;cross&#8217; next to Windows 7 and Windows Vista stating it&#8217;s not supported &#8211; yet, if you have a browse around their public FTP, you&#8217;ll find <strong>Vista drivers</strong> for <strong>Acer 3000, Acer 3020, Acer 5020</strong> and many more that apparently aren&#8217;t supported.</p>
<p>So &#8211; as they can&#8217;t be bothered to link to them for you, here you go:</p>
<p><em>If these links break, you might be able to find your way to their FTP server by paying attention to download locations from their support site. Using Firefox, download something random from their support site, and while it&#8217;s downloading right click the download and click &#8216;copy download location&#8217;.</em></p>
<p><strong>Acer 3020 Windows Vista &#038; Windows 7 drivers:</strong><br />
ftp://ftp.support.acer-euro.com/notebook/aspire_3020/vista/</p>
<p><strong>Acer 3000 Windows Vista &#038; Windows 7 drivers:</strong><br />
ftp://ftp.support.acer-euro.com/notebook/aspire_3000/vista/</p>
<p><strong>Acer 5020 Windows Vista &#038; Windows 7 drivers:</strong><br />
ftp://ftp.support.acer-euro.com/notebook/aspire_5020/vista/</p>
<p>Or have a browse of their FTP server yourself and find whatever else you&#8217;re looking for:</p>
<p>ftp://ftp.support.acer-euro.com/notebook/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/acer-3000-3020-5020-windows-7-windows-vista-drivers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Worthing Computer Help</title>
		<link>http://www.searbe.co.uk/worthing-computer-help</link>
		<comments>http://www.searbe.co.uk/worthing-computer-help#comments</comments>
		<pubDate>Mon, 26 Oct 2009 22:03:24 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=82</guid>
		<description><![CDATA[Really this is just a post to get Google seeing Worthing Computer Help &#8211; my brothers computer support service, based in Worthing. So if you&#8217;re local and need help with your computer, give him a call  
]]></description>
			<content:encoded><![CDATA[<p>Really this is just a post to get Google seeing <a href="http://www.worthing-computer-help.co.uk/">Worthing Computer Help</a> &#8211; my brothers computer support service, based in Worthing. So if you&#8217;re local and need help with your computer, give him a call <img src='http://www.searbe.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/worthing-computer-help/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.04 LAMP, Apache PHP MySQL phpMyAdmin, Windows Fonts, PlayOnLinux</title>
		<link>http://www.searbe.co.uk/ubuntu-904-lamp-apache-php-mysql-phpmyadmin-windows-fonts-playonlinux</link>
		<comments>http://www.searbe.co.uk/ubuntu-904-lamp-apache-php-mysql-phpmyadmin-windows-fonts-playonlinux#comments</comments>
		<pubDate>Sun, 26 Jul 2009 14:30:42 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=67</guid>
		<description><![CDATA[update seeings I&#8217;m getting so many hits for Ubuntu 9.04 LAMP, I&#8217;ll pull out the LAMP-specific bits. Hopefully I don&#8217;t miss anything out. If you&#8217;re after windows fonts etc, you probably want the original version of this post &#8211; so scroll down a bit.
# Install Apache2
sudo apt-get install apache2
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
# Install PHP5 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>update</strong> seeings I&#8217;m getting so many hits for Ubuntu 9.04 LAMP, I&#8217;ll pull out the LAMP-specific bits. Hopefully I don&#8217;t miss anything out. If you&#8217;re after windows fonts etc, you probably want the original version of this post &#8211; so scroll down a bit.</p>
<p><code># Install Apache2<br />
sudo apt-get install apache2<br />
sudo /etc/init.d/apache2 start<br />
sudo /etc/init.d/apache2 stop<br />
# Install PHP5 and the PHP5-CLI<br />
sudo apt-get install php5 libapache2-mod-php5 php5-cli<br />
sudo /etc/init.d/apache2 restart<br />
# Install MySQL<br />
sudo apt-get install mysql-server<br />
# ... and the php/apache mysql gubbins. Also phpMyAdmin.<br />
sudo apt-get install php5-xdebug<br />
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin<br />
sudo /etc/init.d/apache2 restart<br />
# Install rewrite module<br />
sudo a2enmod rewrite<br />
sudo /etc/init.d/apache2 restart</p>
<p># now configure apache2 - I use a domains directory<br />
mkdir ~/domains</p>
<p># shove your vhosts in a config file. I'll just edit default;<br />
sudo gedit /etc/apache2/sites-available/default</p>
<p># Here's a typical vhost;</p>
<p>ServerAdmin webmaster@localhost<br />
ServerName myproject.local</p>
<p>DocumentRoot /home/craig/domains/myproject/public<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride All<br />
Order allow,deny<br />
allow from all</p>
<p># Restart apache - shouldn't get any errors<br />
sudo /etc/init.d/apache2 restart</p>
<p># Finally install subversion<br />
sudo apt-get install subversion<br />
# And the 'open terminal' right-click option<br />
sudo aptitude install nautilus-open-terminal<br />
</code></p>
<p>Okay so that&#8217;s a LAMP setup for you. Now back to the original purpose of this post &#8211; what <strong>I</strong> do when I&#8217;m setting up a new linux box, including windows fonts, etc;</p>
<p>Right I&#8217;m getting fed up of having to do this and getting half way through doing something then realising I forgot something or made a silly little mistake..!</p>
<p>This is what I do to get a nice setup;</p>
<p><code><br />
#First do sys update (system-&gt;admin-&gt;update manager), reboot, select required drivers, then install compizconfig from add/remove</code></p>
<p>sudo apt-get install apache2<br />
sudo /etc/init.d/apache2 start<br />
sudo /etc/init.d/apache2 stop<br />
sudo apt-get install php5 libapache2-mod-php5 php5-cli<br />
sudo /etc/init.d/apache2 restart<br />
sudo apt-get install mysql-server<br />
sudo apt-get install php5-xdebug<br />
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin<br />
sudo /etc/init.d/apache2 restart<br />
sudo a2enmod rewrite<br />
sudo /etc/init.d/apache2 restart</p>
<p>sudo apt-get install msttcorefonts<br />
cd /media/disk/windows/Fonts<br />
sudo cp *.ttr *.TTF /usr/share/fonts/truetype/msttcorefonts/</p>
<p>sudo wget http://deb.playonlinux.com/playonlinux_jaunty.list -O /etc/apt/sources.list.d/playonlinux.list<br />
sudo apt-get update<br />
sudo apt-get install playonlinux</p>
<p>mkdir ~/domains</p>
<p>sudo gedit /etc/apache2/sites-available/default</p>
<p>a typical vhost;</p>
<p>ServerAdmin webmaster@localhost<br />
ServerName myproject.local</p>
<p>DocumentRoot /home/craig/domains/myproject/public<br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride All<br />
Order allow,deny<br />
allow from all</p>
<p>sudo apt-get install subversion</p>
<p>sudo aptitude install nautilus-open-terminal</p>
<p>sudo apt-get install openjdk-6-jre</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/ubuntu-904-lamp-apache-php-mysql-phpmyadmin-windows-fonts-playonlinux/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Symfony Slots</title>
		<link>http://www.searbe.co.uk/symfony-slots</link>
		<comments>http://www.searbe.co.uk/symfony-slots#comments</comments>
		<pubDate>Fri, 15 May 2009 17:55:58 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=56</guid>
		<description><![CDATA[How to use Slots in Symfony.
Symfony Slots are ways to set simple data in one template, and have it displayed in another. It&#8217;s helpful if, for example, you want to set the Title in the layout from a controller actions view. Rather than ramble on about Symfony Slots, I&#8217;ll blast through how Slots are used [...]]]></description>
			<content:encoded><![CDATA[<p>How to use <strong>Slots</strong> in <strong>Symfony</strong>.</p>
<p>Symfony Slots are ways to set simple data in one template, and have it displayed in another. It&#8217;s helpful if, for example, you want to set the Title in the layout from a controller actions view. Rather than ramble on about Symfony Slots, I&#8217;ll blast through how Slots are used in Symfony and leave you to figure the rest out:</p>
<p>First, this is how to retrieve a slot you have set (I will go over setting them in a moment):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> get_slot<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slot_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$x</span><span style="color: #339933;">;</span></pre></div></div>

<p>Or you can just output the slot:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">include_slot<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slot_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Thats useful, for example, in your global template (layout).</p>
<p>You might want to set the slot &#8211; useful in a page-specific view, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">slot<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'The title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Or you can do it like this, so you don&#8217;t have to explain to Mr. front-end developer why a single quote is breaking everything:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> slot<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'extra'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;meta foobarfoo /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> end_slot<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Finally, you might want to check if a slot exists:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>has_slot<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'extra'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
  include_slot<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'extra'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></div></div>

<p>So there you go. Bish, bash, bosh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/symfony-slots/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony Admin Generator File Upload</title>
		<link>http://www.searbe.co.uk/symfony-admin-generator-file-upload</link>
		<comments>http://www.searbe.co.uk/symfony-admin-generator-file-upload#comments</comments>
		<pubDate>Thu, 09 Apr 2009 21:24:08 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=41</guid>
		<description><![CDATA[This post is presuming that you &#8230;

have Symfony 1.2+
have models set up
have some sort of admin area set up, albeit without file uploads

This is *not* about storing file data in the database, it is about storing file *locations* in the database. The actual file data will be stored on the filesystem.
So lets get file uploads [...]]]></description>
			<content:encoded><![CDATA[<p>This post is presuming that you &#8230;</p>
<ul>
<li>have Symfony 1.2+</li>
<li>have models set up</li>
<li>have some sort of admin area set up, albeit without file uploads</li>
</ul>
<p>This is *not* about storing file data in the database, it is about storing file *locations* in the database. The actual file data will be stored on the filesystem.</p>
<p>So lets get file uploads set up. Firstly, go into the form class for the model which you want to accept file uploads (you know, /lib/<strong>form</strong>/doctrine/YourModelForm.class.php).</p>
<p>You need to configure a <strong>widget</strong> and a <strong>validator</strong>. In case you&#8217;re not already familiar, the widget is (sort-of) the input type (textarea, drop-down box, etc) and the validator is the thing that says &#8220;Yes, this input is valid&#8221; or &#8220;No, this input is bad&#8221;. You choose various widgets and various validators, each having their own subset of options.</p>
<p>In the Form class, add a configure function. Make sure it calls the parent configure function so all the base config happens!</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> MyForm <span style="color: #000000; font-weight: bold;">extends</span> BaseMyForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">configure</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now, add a widget to your field. Note that where it says &#8220;the_image_url&#8221;, that&#8217;s simply what I&#8217;ve called the column in my schema. You might have called your column &#8220;image&#8221; or &#8220;file&#8221; or something &#8211; so update it as necesarry.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> MyForm <span style="color: #000000; font-weight: bold;">extends</span> BaseMyForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">configure</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'the_image_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormInputFileEditable<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'label'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'The Image'</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'file_src'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'/uploads/images/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTheImageUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'is_image'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'edit_mode'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isNew</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'template'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'
&lt;div&gt;%file%%input%%delete% %delete_label%&lt;/div&gt;
'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Nearly done &#8211; add a validator. In my case I will only allow images, so I set &#8216;web_images&#8217; as the mime_types option:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> MyForm <span style="color: #000000; font-weight: bold;">extends</span> BaseMyForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">configure</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'the_image_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormInputFileEditable<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'label'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'The Image'</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'file_src'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'/uploads/images/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTheImageUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'is_image'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'edit_mode'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isNew</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'template'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'
&lt;div&gt;%file%%input%%delete% %delete_label%&lt;/div&gt;
'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validatorSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'the_image_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfValidatorFile<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'required'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'path'</span>       <span style="color: #339933;">=&gt;</span> sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sf_upload_dir'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/images'</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'mime_types'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'web_images'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And finally, add a &#8216;delete&#8217; button so you can delete the image (optional, but if you don&#8217;t do this, you should probably remove the %delete% stuff from the template section of the file field&#8217;s widget!)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> MyForm <span style="color: #000000; font-weight: bold;">extends</span> BaseMyForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">configure</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'the_image_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormInputFileEditable<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'label'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'The Image'</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'file_src'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'/uploads/images/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTheImageUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'is_image'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'edit_mode'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isNew</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'template'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'
&lt;div&gt;%file%%input%%delete% %delete_label%&lt;/div&gt;
'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validatorSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'the_image_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfValidatorFile<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'required'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'path'</span>       <span style="color: #339933;">=&gt;</span> sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sf_upload_dir'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/images'</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'mime_types'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'web_images'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validatorSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'feature_image_url_delete'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfValidatorPass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then go for a &#8220;symfony cc&#8221;, generate your admin area if you haven&#8217;t already, and enjoy your lovely file uploads <img src='http://www.searbe.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hope that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/symfony-admin-generator-file-upload/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Web Authoring Component failed to install, Cannot open include file: &#8216;windows.h&#8217; or &#8216;d3dx9.h&#8217;, Cannot open file &#8216;dxerr.lib&#8217; &#8211; Solutions</title>
		<link>http://www.searbe.co.uk/web-authoring-component-failed-to-install-cannot-open-include-file-windowsh-or-d3dx9h-cannot-open-file-dxerrlib-solutions</link>
		<comments>http://www.searbe.co.uk/web-authoring-component-failed-to-install-cannot-open-include-file-windowsh-or-d3dx9h-cannot-open-file-dxerrlib-solutions#comments</comments>
		<pubDate>Sun, 08 Mar 2009 13:19:45 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bad User Experience]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=37</guid>
		<description><![CDATA[Oh WOW you really do forget how much of a headache getting Visual C++ ready to use is. Fixing these errors is so majorly counter-intuitive, and from the point of view of someone who programs in C++ once in a blue moon it&#8217;s a total pig when you want to spend an evening programming then [...]]]></description>
			<content:encoded><![CDATA[<p>Oh <b>WOW</b> you really do forget how much of a headache getting Visual C++ ready to use is. Fixing these errors is so majorly counter-intuitive, and from the point of view of someone who programs in C++ once in a blue moon it&#8217;s a total pig when you want to spend an evening programming then realise you&#8217;ve reformatted and gotta install everything again.</p>
<p>Anyway a check-list to myself and hopefully will help others. To get Visual Studio and (optionally) set up with the DirectX SDK, there is a hell of a lot of messing around to do.</p>
<p>Download and install Visual Studio 2008.</p>
<h2>Microsoft Visual Studio Web Authoring Component failed to install &#8211; WebDesignerCore.EXE download</h2>
<p>First problem was this bugger. The suggestion I came across was &#8220;re-download VS 2008&#8243; as it&#8217;s corrupt. If Virgin Media hadn&#8217;t capped me to 250Kbps that wouldn&#8217;t be such a problem, but unfortunately the UK is a country where you&#8217;re not allowed to use your 10Mbps connection without severe punishment.</p>
<p>The solution here? Download WebDesignerCore.EXE &#8211; you can <a href="http://go.microsoft.com/fwlink/?LinkId=95934">get it from Microsoft.com</a>. Extract it using WinRAR (it can read the .exe as an archive). Install manually.</p>
<p>Now try to install Visual Studio 2008 again &#8211; it&#8217;ll probably work nicely.</p>
<p><em><strong>NOTE</strong></em>: If you still have problems with this component, you might like to try fiddling with the versioning <a href="http://www.screwtheweb.com/?p=6">as described at ScrewTheWeb.com</a> and <a href="http://msmvps.com/blogs/paulomorgado/archive/2008/03/23/web-authoring-component-install-fails-when-installing-visual-studio-2008.aspx">MSNVPS</a>.</p>
<h2>fatal error C1083: Cannot open include file: &#8216;windows.h&#8217;: No such file or directory</h2>
<p>Next up, cannot open include file windows.h. Great &#8211; it turns out the Windows Platform SDK doesn&#8217;t come with Visual Studio &#8211; a serious &#8220;WTF&#8221; there! It also turns out they&#8217;ve bloated the latest release by an extra gig &#8211; from ~400mb to ~1,300mb. So go <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&#038;displaylang=en">download the Windows Platform SDK</a>.</p>
<p>This was extra irritating on my 250Mbps cap. *grumble moan grumble*</p>
<h2>fatal error C1083: Cannot open include file: &#8216;d3dx9.h&#8217;: No such file or directory</h2>
<p>Argh &#8211; now what?! You need to set up Visual Studio to look for the DirectX SDK stuff. You did <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=5493F76A-6D37-478D-BA17-28B1CCA4865A&#038;displaylang=en">download and install the DirectX SDK</a>, right? Oh well good news &#8211; there&#8217;s another ~450MB for you to download.</p>
<p>Once that&#8217;s installed, in Visual Studio 2008, go to Tools -> Options -> Projects and Solutions -> VC++ Directories. In the top right drop-down menu, where it says &#8220;Executable Files&#8221;, change that to &#8220;Include Files&#8221;. Add to the list (double click just after the last entry to create a new one) your SDK Include directory &#8211; mine is &#8220;C:\Program Files (x86)\Microsoft DirectX SDK (November 2008)\Include&#8221;, but perhaps you installed yours somewhere more sensible.</p>
<h2>fatal error LNK1104: cannot open file &#8216;dxerr.lib&#8217;</h2>
<p>Joy! More errors! There must be some way to fix this properly, however you can solve it by copying from your &#8220;Microsoft DirectX SDK (November 2008)\Lib\x86&#8243; directory into your projects directory. You will get a bunch of these &#8211; including a d3dx9d.lib error &#8211; which shouldn&#8217;t be confused with the one above.</p>
<p>To get my simple project working I had to copy over:</p>
<ul>
<li>d3dx9d.lib</li>
<li>d3dx10d.lib</li>
<li>DxErr.lib</li>
<li>dxguid.lib</li>
</ul>
<h2>Fingers crossed, now everything works!</h2>
<p>It took a while, but now I can compile a fantastic DirectX project that shows me a blank blue screen. Deep breath. One evening wasted, hopefully I can actually get on with some programming today.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/web-authoring-component-failed-to-install-cannot-open-include-file-windowsh-or-d3dx9h-cannot-open-file-dxerrlib-solutions/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Symfony Get Raw Data from Function in Template</title>
		<link>http://www.searbe.co.uk/symfony-get-raw-data-from-function-in-template</link>
		<comments>http://www.searbe.co.uk/symfony-get-raw-data-from-function-in-template#comments</comments>
		<pubDate>Sun, 01 Mar 2009 23:38:20 +0000</pubDate>
		<dc:creator>searbe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.searbe.co.uk/?p=27</guid>
		<description><![CDATA[If you&#8217;re in a template in Symfony, and you have your output escaping enabled, one thing that bugged me was when I tried to do this:

$my_model-&#62;getMyOutput&#40;'param1','param2'&#41;;

The output would be escaped &#8211; for example I&#8217;d get &#8220;&#60;b&#62;this is bold&#60;/b&#62;&#8221; rather than &#8220;this is bold&#8220;. The usual $my_model-&#62;getRaw(&#8217;MyOutput&#8217;) didn&#8217;t help, as it doesn&#8217;t accept parameters (actually I [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re in a template in Symfony, and you have your output escaping enabled, one thing that bugged me was when I tried to do this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$my_model</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMyOutput</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'param1'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'param2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The output would be escaped &#8211; for example I&#8217;d get &#8220;&lt;b&gt;this is bold&lt;/b&gt;&#8221; rather than &#8220;<strong>this is bold</strong>&#8220;. The usual $my_model-&gt;getRaw(&#8217;MyOutput&#8217;) didn&#8217;t help, as it doesn&#8217;t accept parameters (actually I expected it to take an optional second parameter, being an array of parameters, and was quite suprised to find that wasn&#8217;t the case).</p>
<p><em>A quick note &#8211; incase you weren&#8217;t already aware &#8211; calling $model-&gt;getRaw(&#8217;Column&#8217;); will get the unescaped version of $model-&gt;getColumn;</em></p>
<p>The solution is there, sitting happily in the documentation. But I want to give you a Google insta-answer. What you need to do is put ESC_RAW as the last parameter:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$my_model</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMyOutput</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'param1'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'param2'</span><span style="color: #339933;">,</span>ESC_RAW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Then your template gets the raw output of the function you&#8217;re calling, rather than automagically escaping the data for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.searbe.co.uk/symfony-get-raw-data-from-function-in-template/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
