The file certainly has the PDF icon but it says “Kind Application” and did not show the Quick Look preview of a normal PDF file.
Lightbulbs go off. This is an application bundle. So I right clicked on it and selected “Show Package Contents” and was rewarded with a tree structure starting with Contents. Drilling down I got to Resources which contained a number of .lproj folders with the name of a different language. Mac OS X developers will recognise these as internationalised resources associated with an application. So I went into the English.lproj folder and was rewarded with the real Exploring Aperture 3.pdf file. I made a copy to my Aperture documents folder and then dragged this one into iTunes and voilà – it was added to Books! So if you ever have a problem with a PDF file which doesn’t act like one – such as being unable to drag it over to iTunes, take a look - it might well be an application suitably disguised as a PDF!
- Go to System Preferences
- Select Sharing
- Click on the Web Sharing checkbox
The RapidWeaver theme I’m using for Free Range Coder is Unity 2.0 from NimbleHost. It’s a really nice simple theme which automagically adapts itself for the iPhone / iPod sized devices. It also uses PHP and the default configuration file for Apache in Snow Leopard does not have PHP enabled. I found this site which walks you through the configuration file changes for Apache and setting up the PHP initialisation file. In a nutshell:
To enable PHP in Apache - uncommenting the line below in /etc/apache2/httpd.conf:
LoadModule php5_module libexec/apache2/libphp5.so
Copying the default php.ini file from php.ini.default file in /etc:
sudo cp php.ini.default php.ini
The article goes on to show how to fix a warning in phpinfo() by setting the timezone in php.ini.
Back to RapidWeaver... So I dilligently exported the Free Range Coder website into frc in Sites within my Home directory. Launched Safari and typed in http://localhost/~kirschen/frc in Safari’s location bar and the page came up. But... It wasn’t what I had expected – the Unity theme style had not been applied.
And then I remembered what I had heard at the end of the Nosillacast Episode 301 - I’ll just check the Console Logs! I fired up Console (which we all know lives in the Utilities folder under Applications) and switched to All Logs. I typed in “apache” in the search bar in the upper right. And I saw bajillions (and that’s a technical term) of errors, all similar, one of which read:
[Sat Mar 05 12:43:41 2011] [error] [client ::1] (13)Permission denied: file permissions deny server access: /Users/kirschen/Sites/rw_common/themes/unity_v2.0/scripts/extracontent.js, referer: http://localhost/~kirschen/index.php
Aha! The plot thickens! This told me that some files were not readable by the Apache server, and where the files resided. Yes - the Unity theme. I whipped up a Terminal window and cd’ed over to /Users/kirschen/Sites/rw_common/themes/unity_v2.0 and listed the files therein using the ls -al command. The errant files had the same Unix permissions, an example – the one referenced in the Console Log – was:
-rw------- 1 kirschen staff 217 Mar 5 2009 extracontent.js
The rw indicated that the user (myself) had read and write permissions on the file, the dashes showed that members of my group (staff) and other users had no access permissions at all. So how does one fix permissions like this? No, you cannot use the Disk Utility “Repair Permissions” as Mac OS X knows nothing about what the correct permissions for these files should be. We’ll have to make the permissions changes ourselves from the Terminal. I could change the permissions in the frc directory but the next time an export was made from RapidWeaver, the Unity theme files would be overwritten and I’d be back changing permissions again. No, I had to make the change in the RapidWeaver theme directory. So, here are the steps from the Terminal:
cd “~/Library/Application Support/RapidWeaver” – This brings us to the RapidWeaver application support directory in which the Unity theme is installed
chmod -R go+r Unity-v2.0.rwtheme – The Unity theme shows up as a file in the Finder but it’s actually a file bundle. The chmod command will change the permissions so that the group (g) and others (o) get read permission (+r) and the -R option tells chmod to recursively go down the directory structure within the Unity-v2.0.rwtheme directory.
Re-exported the Free Range Coder site into frc – and it works as advertised! So now I can tweak the CSS files to my hearts content before committing the changes to the theme directly.
MailTags is a Mac OS X Mail application plug-in much like Mail Act-On. It’s from indev software at indev.ca. What MailTags does is it lets you add tags to your mail messages, and much much more.
So - as always, what’s the problem to be solved? more...