Ask a Question related to PHP Development, Design and Development.
-
Allman #1
Apache + PHP problem, can't reply to OPTIONS request.
I'm trying to implement a small WebDAV server using PHP. (WebDAV is an HTTP
extension that (among other things) makes it possible to manage files using
the HTTP protocol; kinda in the same way like using FTP through a
web-browser.)
I've made a short index.php file which is automatically run when then target
directory is accessed using a browser; so, if I try to browse
[url]http://mysite.com/webdav/[/url], [url]http://mysite.com/webdav/index.php[/url] is executed.
Inside index.php I have the following logic:
[...]
switch ( $_SERVER["REQUEST_METHOD"] )
{
// List contents of current directory.
case "PROPFIND":
{
// Code for doing directory listing goes here.
}break;
// Options:
case "OPTIONS":
{
// Send a specific reply / identify ourself.
}break;
// GET/Download file
case "GET":
{
// Code for sending a file to the client goes here.
}break;
[...etc...]
}
[...]
When I try to use M$ Internet Explorer to access [url]http://mysite.com/webdav/[/url]
(the index.php file is executed), the following lines are added to apache's
access.log:
10.0.2.164 - - [28/Jul/2003:16:30:26 +0200] "GET /_vti_inf.html HTTP/1.1"
404
285 "-" "Mozilla/2.0 (compatible; MS FrontPage 5.0)"
10.0.2.164 - - [28/Jul/2003:16:30:26 +0200] "POST
/_vti_bin/shtml.exe/_vti_rpc
HTTP/1.1" 404 299 "-" "MSFrontPage/5.0"
10.0.2.164 - - [28/Jul/2003:16:30:26 +0200] "OPTIONS / HTTP/1.1" 200 - "-"
"Microsoft Data Access Internet Publishing Provider Protocol Discovery"
10.0.2.164 - - [28/Jul/2003:16:30:26 +0200] "OPTIONS /webdav HTTP/1.1" 400
293
"-" "Microsoft Data Access Internet Publishing Provider Protocol Discovery"
Forget the first two lines (this is just some M$ specific stuff), the third
line is also unimportant since the server automatically replies with HTTP
OK.
The last line is the problem: My script needs to reply with some specific
headers when the client sends an OPTION request (in order to identify
itself).
However, the "OPTIONS" case (inside switch ( $_SERVER["REQUEST_METHOD"] ))
of
my script never gets executed (GET, PROPFIND, etc. works). Could it be that
Apache is not sending the OPTIONS requests to the PHP-script itself? If so,
how can I make it do this?
Allman Guest
-
can anyone from macromedia pls reply (streaming problem)
Hi Guys, Have install FCS work perfectly, Everthing seems ok but not streaming video. I used the dreamweaver flash video extension to make the... -
Apache::Request installation issues
Hi All, Im trying to install libapreq-1.3 on AIX. Other installed packages are: mod_perl-1.27 Apache_1.3.27 perl-5.8.3 When I run the make... -
install Apache::Request problems.
I've been trying to install a bunch of perl modules all day using CPAN. I've come to install Apache::Request and it seems to go through fine up... -
Problems to install Apache::Request
Hi I am not very experienced with Perl. I try to install RT and part of it is to install the module Apache::Request. While all other modules... -
Apache::Test, Apache::Request, libapreq, mod_perl. Installation Problem.
Hi everyone, If anyone has any insight into my problem, it would be much appreciated. I'm trying to install Scoop (scoop.kuro5hin.org) to run on...



Reply With Quote

