php and nginx fixes