note 56694 deleted from tutorial.firstpage by nlopess

From: Date: Mon, 12 Sep 2005 19:47:31 +0000
Subject: note 56694 deleted from tutorial.firstpage by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-95075@lists.php.net to get a copy of this message
Note Submitter: corz at corz dot org ---- About the permissions thing. I sense beginners might be just as confused at this point. The big difference is that 755 is used for files that need to be *executable*, ie. run. Mostly, php files do NOT need to be excecutable, so 644, or 444, or whatever, is fine. Try this first, with a file containing simply.. <?php phpinfo(); ?> If you get a big old page of stuff, then 644 is fine for you, php is running as a module, good. However, on some (weird) servers where php is running as a cgi (and php files will have something like #!/usr/bin/php at their very top, and the admins will argue that there are certain security benefits, and lose) php files MUST be excecutable, just like bash (unix shell) scripts. aha! The trouble is that most of these servers will run some back-end process that invisibly and automagically *adds* the #!/usr/bin/php part to the top of every php script (because it would be a total pain to ask all their clients to add it to all their scripts manually, and keep remembering to do it), so there's no obvious way for users to know. That big old page of stuff will tell you. But if you are one of those who *needs* to have executable php scripts, you won't even see the page untill you do "chmod 755 /path/to/my/script.php" (no quotes) and by then it's too late. make fun! ;o) (or

« previous php.notes (#95075) next »