Archive for July, 2008
sIFR and Google. My blog posts are not being indexed.
by Siu Lun on Jul.11, 2008, under Ramblings
I’ve been doing some search on this before I actually took the plunge to use sIFR text on my blog headings and it seems to suggest that google will index them.
However!!! If you search “pecl mac osx php install” my blog is on page 2 of results and it points directly to the index page. However no where in the results is there a link to the actual post with the title as the heading! Which would’ve gain much higher recognition using those keyword search.
Therefore I can conclude that google is not indexing my sIFR’s “hidden” title and link.
How To: Installing the fileinfo pecl extension to Mac OS X Leopard
by Siu Lun on Jul.04, 2008, under Mac, Web
Many people had problems installing the fileinfo pecl extension into Mac OS X. I believe this is probably a problem in a lot of other packages as well. From a search through the net I cannot find any workaround but I’ve come up with me own.
First of all I need to state that I’ve installed Apache and PHP via MacPorts. PHP is configured with Pear.
Once you’ve got that set up.
Do:
sudo pecl install fileinfo
At which point you’ll get an error saying something about libmagic doesn’t exist etc…
First of all. If you haven’t installed libmagic yet. Do:
sudo port install file
If you couldn’t install file and it was about it couldn’t fetch the file file… >.> then it’s probably about this: http://trac.macports.org/ticket/15831
Anyway, once you’ve got file installed via macport, we’ll go back to that error message about libmagic.
To address it, you should find the files under /private/tmp/pear/download/Fileinfo
what we’ll do essentially is now to just change the configure script. By:
mate /private/tmp/pear/download/Fileinfo*/config.m4
Once you’ve opened it up in textmate (or an editor of your choice) do a search for “SEARCH_PATH=”
and add in /opt/local into the mix. At the time of writing with Fileinfo v1.0.4 it is on line 8 and you should end up with: SEARCH_PATH=”/opt/local /usr/local /usr /usr/share/file”
Save the file. Now we’ll install PECL modules manually.
To do that, simply follow this:
http://php.net/manual/en/install.pecl.phpize.php
Hope this will help someone. (if anyone ever finds my blog =])
edit: Oh, and when you start using it. You may have to manually specify where the magic database file is. I had to and mine was at : ‘/usr/share/file/magic.mime’ OR you can choose to rebuild it to your chosen path by editing config.m4 and find: MAGIC_MIME_DIRS and add in your chosen magic database file’s path to the front of the mix.
This is how mine looks like:
MAGIC_MIME_DIRS="/usr/share/file /opt/local/share/file /usr/local/share/file /usr/share/misc/file /etc /usr/share/misc"
MAGIC_MIME_FILENAMES="magic.mime magic"
Once you’ve rebuilt it then restart apache and it’ll work. (remeber to do a clean rebuild!)


