bunch of changes for php5.6, latest apache, ubuntu 14.04