|2012-05-22 13:06:00||annoyed||FriComedy: Now Show 10 Jun 2011 – BBC Radio 4|
So I’m trying to work my way through a teach-yourself PHP book. Macs apparently have come with PHP since the beginning of OSX. However, either you need to enable the bundled PHP by modifying the Apache web-server configuration file or install it yourself.
I’ve tried enabling PHP on two different macs by following the instructions here. This seems to work, in that the
phpinfo() command works. Also, simple commands within PHP scripts that make HTML to display formatted text
work. (With no apologies for using
<font> tags instead of
$variables and form-handling fail – it seems that values for variables aren’t getting through to the guts of PHP. To find out whether I’m simply keying incorrectly, I’ve tried using the scripts provided by the book’s author – still no joy.
So I thought I’d try freshly installing the most up-to-date version of PHP I could on the mac I’m using for this, my 1GHz TiBook running MacOSX 10·5. Instructions are here: I went for the MacPorts route. macPorts provides a way of installing standard Unix stuff onto the Unix underlying OSX.
I found the version of MacPorts appropriate to 10·5. It tells me it needs Xcode, Apple’s IDE. Usually Xcode comes with the installer for OSX but wasn’t included in my copy of 10·5. But it’s available from Apple’s website – you have to do a little digging for the appropriate version (3·1·4).
To get it, you need to be a registered Apple Developer. (Hollow laugh – while developing for iOS and MacOS is one of my eventual aims, I’m so far away right now it’s frightening.) Anyway I registered and then waited for the 1GB download to finish.
Xcode is now installing on the TiBook – it’s going to take about an hour to install. Then I need to install MacPorts and then find how to use it, then install and configure PHP and then see if form-handling works… Bah!
<rant>This all seems so un-necessary – why can’t there be a simple, standalone installer? If it needs to install other stuff (i.e. if there are dependencies), so be it – the installer can notify you and ask permission to install this stuff. It’s all open source, so where’s the problem. To comply with open source ideals (which I broadly agree with), the raw source code can simply be on the provider’s website or , thus providing the option for those who want to compile and install their own stuff or contribute to development. The rest of us just want to install and use software.