473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

http://mysite.com/webdav/, http://mysite.com/webdav/index.php 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 http://mysite.com/webdav/

(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?
Jul 16 '05 #1
0 2969

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jean-Louis Vill | last post by:
=============================================================================== I installed PHP from an RPM, but Apache isn't processing the PHP pages! What's going on here? Somebody can help me ?...
3
by: Jean-Louis Vill | last post by:
I did a mistake with the files name (http.conf ==> httpd.conf). See at the end. =============================================================================== I installed PHP from an RPM, but...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
0
by: Joshua McCulloch | last post by:
I have setup Apache 2.0.47 on Windows XP to serve jsp/servlet requests using Tomcat 4.1.27. I did this using the mod_jk2 module and was able to successfully connect to http://host/examples and get...
1
by: Sam Carleton | last post by:
Is it possible to have apache host an asp.net app on a windows server? If so, how? Sam
5
by: writeson | last post by:
Hi all, I'm wondering if anyone has tried a scenario that I'm thinking of. At my job we've got a web based product provided by Apache running PHP that accesses MySQL. This web application is...
3
by: anthonybrough | last post by:
I have an asp page that has a form to collect user data in a form. when the user clicks submit the input is validated. If any fields are not acceptable the user clicks on a button to go back to...
6
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.