note 56694 added to tutorial.firstpage
| From: | corz at corz dot org | Date: | Mon, 12 Sep 2005 19:18:35 +0000 |
| Subject: | note 56694 added to tutorial.firstpage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95066@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/tutorial.firstpage.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56694
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56694&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56694&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56694&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56694&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56694&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56694&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56694&report=yes
Search -- http://master.php.net/manage/user-notes.php