I took a quick look, you got some file permissions wrong.
Having them as 777 on a file, or folder, that you are accessing with the browser will cause that error. 777 means world writable, which is a security problem.
In general files should have 644, and folders 755. Only rarely do any script...