For CGI like perl and PHP/CGI, make sure the files are executable for yourself (u+x).
For the more commonly used SAPI version of PHP, you don't need executable files. However, when they are executed, they don't have your access rights, but the ones of the webserver. In consequence, all your scripts need to be world readble (o+r). If you want your scripts to write in directories or edit files, those directories will have to provide write access to anyone, which is sadly unsafe.