hanlon, don’t set the file to writable. it should already be writable.
your problem is a matter of permissions. the file you’re trying to edit is owned by root. Just editing with sudo pico php.ini
should be enough. You’ll be asked for your system password and then be off to the races.
not trying to say you’re dumb, can’t make assumptions about what you know about the terminal, sudo is the command to tell the system that you wish to behave as the super user (aka root).