Saturday, 16 October 2010

Various stuff

This morning I was still trying to get the PEAR Mail class installed. With pyrus.phar refusing to work, I tried using php/bin/pear install Mail-1.2.0, but this gave an error about not being able to write to php_dir. Weirdly I just tried it again now like php/bin/pear install --alldeps Mail and it worked fine. It definitely was not working this morning.

After trying a few things to get pear working, I gave up and decided to download the packages from the PEAR website and see if it was something that needed to be installed using pear or pyrus.phar, or just some files I could put in the right place manually. Thankfully, it was the latter, so I downloaded and unzipped the packages I needed, then placed the PHP files in the correct place (php/lib/php).

With php/lib/php included in the include setting for the site in php.ini, I loaded up the website and tested the contact form. It worked and PHP didn't break!!!

When manually downloading the PEAR packages needed, I noted that they actually have a GEO_IP class. Since I'm only updating nginx and php to get this ability, that means I could have just installed that module, and saved all the work I've done all last work in trying to get nginx and php installed and working properly. But then I would likely still have had the same problems when I try to update nginx / php sometime in the future, so it wasn't a week lost for no reason.

After getting that working I watched an episode of The Masked Rider with L and Mauser, and then topped up the garden pond.

After lunch I processed my Fuji IS-Pro files using CornerFix, and it worked well. It took quite a while to process them though.

When that was done I checked whether the problem with php breaking was due to the old PEAR packages or their location. I copied the old PEAR files from /usr/local/lib/php to php/lib/php, and tried the contact form on the website, and it still worked okay. So the problem was with the location, not sure how the files being a folder php doesn't have permission to write to would make php break though.

In the evening I watched an episode of Power Rangers with L, and the rest of Even Dwarves Started Small with Mauser and L. I processed some more photos as well.

No comments: