Jan 30

life

As I noted in my last post, I recently took the hard and dirty path of trying to upgrade php and mysql on my web server.
This was driven by my need to have PHP 5.13 and support for SimpleXMLElement->addChild() .
Unfortunately, support ended on the standard repo’s for FC4 some time ago. This meant that I would have to download and recompile if I wanted to have an upgrade path for php. I don’t have that kind of energy.
Luckily I was able to use some google-fu, and find a solution.
This site Les RPM de Remi, albeit in french, provides an awesome repo, and compatibility updates for RHEL 4 and 5, FC 3,4,5,6 and more.
This means I had a nice easy path to upgrading php and mysql.
See the details below to see how easy it was to update mysql 4 to mysql 5, and php 5.04 to php 5.25 .

To utilize for FC 4, follow these instructions:

1 . Install the remi rpm .
wget http://remi.collet.free.fr/rpms/remi-release-4.rpm

rpm -Uvh remi-release-4.rpm

2. Install the remi yum repository.
cd /etc/yum.repos.d
wget http://remi.collet.free.fr/rpms/remi-fedora.repo

3. Update - Update - Update
This should find all dependencies and include them.
I suggest doing mysql first, as php update may fail if you don’t.

yum --enablerepo=remi update mysql
yum --enablerepo=remi update php

So far everything worked flawlessly for me.
But YMMV. Backup your databases.
Be prepared to re-install your OS, or be smart enough to undo what you are doing.
Use caution, and enjoy.

Jan 24

I recently spent a fair amount of time at home as a result of the birth of my son Lucas.
Between naps and feedings and diaper changes, I had a bit of free time available. I used this time trying to find a suitable method of sharing baby photos online.
Flickr was an option, but there is no way my parents or relatives would have been into signing up, and the embedding options weren’t great.
I thought about just hosting on my web site, but iPhoto created some pretty crappy html when you exported for the web. And I couldn’t very easily add new stuff without re-exporting, and then re-uploading to the web server.
I didn’t have the energy or focus to “write my own”, so I searched the Interweb for an answer.
I think I found a reasonable solution. I implemented a cool Flex/php solution called Fotoviewer from FOTOCRIB . It provides a nice little flash photo browsing interface that automatically shows thumbnails in a list view, a carousel browsing view, and very nice and flexible slide show option. Demo HERE
If you know of any better options, or have found something that you like, let me know.

Screen shot

Adding photos is as easy as creating a directory and naming it the way you want the “album” to be named. Photo captions then depend on the file name of the photo. iPhoto makes this easy if you are used to changing image titles and make it a habit. You can simply export the images from iPhoto, and tell it to export using the title as the file name.

The downside to this solution is that it appears to load all the images in the browser at once. If the album is large, and the images haven’t been cached in your browser , or are not “web safe” sizes, it can take a while for all of them to load.

A word of warning. You need php 5.1.3 or better to use this. Fotoviewer stores meta-data in xml files,and implements SimpleXml methods that aren’t available if you are on an older version of php. Specifically SimpleXMLElement->addChild(). This caused me a a whole host of problems that lead me on a fun path to upgrade my webserver.

Overall, not sure this is the best method, but it currently allows me to avoid too much work with the photos themselves, and uploading an image is all it takes to add it to an album.