Installing PHPture on Mac OS X
Setting up the webserver
PHPture allows you to view your library in a web browser. In order for it to work you need to set up a web server that can serve the pages to the browser.
Mac OS X 10.4 comes bundled with Apache webserver and PHP, however, PHPture requires at least version 5, so you need to install that first.
The easiest way to install PHP 5 on Mac OS X is by downloading the PHP Apache Module from entropy.ch. Download the file, open it and follow the instructions, it should be easy.
The next step that you need to do is go to the System Preferences and select the Sharing-panel. In the list select Personal Web Sharing and turn it on.
Enter the address that is shown on the bottom in your browser to test if the web server is running, if it is, you should see a page with the text 'Your website here'.
If you want to allow other computers to access PHPture on the network go to the Firewall-tab and enable Personal Web Sharing there too. Please note if you are directly connected to the internet your library will also be available for others! Please refer to the Apache documentation on how to require authentication for users.
Setting up Apple Aperture
This step is optional, you can skip it if you want.
Open up Apple Apertue and go the the Preferences window (in the Aperture menu).
The first field, labeled 'Library Location' is the path and name of your Aperture Library. If this is the library that you want to share using PHPture, remember the location, you will need it in the following steps.
In the bottom, make sure that both the checkboxes are checked.
Setting up the system
Navigate to the library file that you want to use in Finder and use the 'Get Info' command to open the window with more details about the file.
Expand the option 'Ownership & Permissions' and 'Details' and set 'Others' to 'Read only' so that the webserver can read from the library.
Be sure to click the button 'Apply to enclosed items' to make the entire library readable!
Setting up PHPture
In Finder, go to your home-directory and open the directory 'Sites', this is where the test page for the webserver that you saw earlier in your browser is located.
If you haven't downloaded PHPture yet, do so now and unzip it to the directoy named Sites.
Open the configuration file conf.php in a text-editor and replace the default location of the library with your own (line 25).
Make sure that your location does not start with ~ (tilde). If so, replace it by Users/ followed your username, just like in the example.
If your username is 'Johnny' and the library is located in the Pictures directory ~/Pictures/Aperture Library.aplibrary will have to be changed into /Users/Johnny/Pictures/Aperture Library.aplibrary.
Upgrading PHPture
If you have a previous version of PHPture installed, just overwrite all files, including the configuration file. After copying the files update the configuration file with your own settings.
Accessing PHPture
Accessing PHPture is similar to visiting a website, open up a web browser and enter the address http://127.0.0.1/~Johnny/phpture where 'Johnny' is replaced with your own username.
127.0.0.1 is always the IP-address of the current computer. Alternatively you can also use the address http://localhost/~Johnny/phpture/.
Please note the last / (slash) in the address, if you leave it out things might not work.
If you try to open an file by double-clicking on it in Finder the files the address will be something like file:///Users/Johnny/Sites/phpture/index.php and the files will not be parsed by PHP, and you will see the PHP-code instead.