Monthly Archives: December 2010

PCRE unicode support CENTOS

Centos PCRE repo is 6.6, and cannot be YUM REMOVED without removing hundred of dependancies…

I needed to install PCRE with unicode support which meant compiling my own package.

First you need to install all the correct libs

yum install gcc-c++

then download latest pcre from

unpack and configure

./configure --prefix=/usr


make check

make install

the libraries will be installed to /usr/lib and you will need to add a new path for your DSO loader create a file called pcre.conf in the directory


and insert the path


save and close and update the cache by running


restart your web server and check phpinfo that your PCRE module has been updated to 8.11 (or latest).


Rotating your log files will save you a bunch of space from bloated web logs growing out of control. Logrotate is easily customisable to suit any needs.

To force logrotate to rotate out of schedule use the f flag, and to make it output to screen, use V for verbose ie.

Below is an excerpt for Logrotate configured with lighttpd. you will need to reload your specific web server with its own reload command.

IndexPath Row from sub-function

Ever wondered how you could generate the IndexPath row from a Function not related to tableview?

UITableViewCell *clickedCell = (UITableViewCell *)[[sender superview] superview];
NSIndexPath *clickedButtonPath = [_tableView indexPathForCell:clickedCell];
int row = [clickedButtonPath row];