Edit php files on raspbian

If you try to update/ edit PHP files on raspbian such as config/php using vi editor, it will say something along the lines of you not having permission to do so. Use Leafpad instead, it took care of my problems, somehow it has the right permissions/root to change/edit these type of files.

What exactly are you asking? vi and vim are very powerful editors but the handling is perhaps a bit less intuitive in the beginning than others. Just choose an editor that suites you best. If you open the same file via different terminals it is possible that one session only lets you open the file read-only.

Hmm, if I understand it right, leafpad has permissions, but vi not? The permissions usually come from the user that starts the editor. Maybe leafpad somehow is started as root user with gksudo command or something and you start vi as user with limited permissions? sudo vi filename should do the job, otherwise please add some screenshot or copy the exact error messages from terminal for further investigation.