RE: [PHP] Directory Listing Problem
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Tue, 03 Oct 2000 09:15:31 +0000 |
| Subject: | RE: [PHP] Directory Listing Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18389@lists.php.net to get a copy of this message | ||
You'll need to chmod 777 the directory (and under) to check
from a shell:
chmod -R 777 /usr/local/apache/htdocs
then open from code you had.
ought to do it (permissions wise).
Why do you want a /tmp out of the web root though? Slightly confused by
that, .htaccess would solve permissions from apache side, so you wouldn't
have security issues...
NB $DOCUMENT_ROOT gives the web document root - so if you wanted
/usr/local/apache/htdocs/intranet/tmp for example and your $DOCUMENT_ROOT
was /usr/local/apache/htdocs/intranet, then you would just add /tmp to the
end of it.
I would do a print of the $DOCUMENT_ROOT anyway to see what the web root is
anyway, so we can then test a directory from there.
eg
<?php
print "Document root is:".$DOCUMENT_ROOT;
?>
Its a useful thing to know imho.
Cheers,
Lawrence.
-----Original Message-----
From: Samantha Savvakis [mailto:samantha@cfs.net.au]
Sent: October 3, 2000 05:05 PM
To: Ramender Kishore; PHP General
Subject: RE: [PHP] Directory Listing Problem
I know that the "apache" user can read this directory. Just logged in as the
"apache" user and I can do directory listings. I created a few files just to
make sure I was logged in as the right user. There is another directory I've
got setup at this file path: /usr/local/apache/htdocs/intranet/quality
I can go directly to this directory within my browser and it will give me a
directory listing.
********************************
Index of /intranet/quality
Name Last modified Size Description
----------------------------------------------------------------------------
----
Parent Directory 03-Oct-2000 18:21 -
Configuration/ 03-Oct-2000 17:45 -
Installation/ 03-Oct-2000 17:45 -
Testing/ 03-Oct-2000 17:46 -
----------------------------------------------------------------------------
----
Apache/1.3.11 Ben-SSL/1.38 Server at can.bris.cfs.net.au Port 80
*********************************
I tried to read that same directory in the opendir code and it still won't
give a directory listing. I changed permissions on all files to 755 to see
if the execute permission on files as well as directories would make the
difference.
I'm trying out all suggestions here. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net