I would use the dropdown from within mamp that allows you to do things like change your php version (there's actually a really nice way of using github to get whichever version of php you want but that's for a different day) to access your php settings. Then you don't need to edit the file in situ as in my experience it either caches or stores it's own copy of the ini file elsewhere. This is for MAMP Pro though so ymmv.