[WIP] php extension support

php extension support + php5 imagemagic extension