found a directive for php.ini named allow_webdav_methods that is by default off.
this didn't help cause my php version was 4.3.2 and according to http://il.php.net/ini.core it's not working on this version, so I also upgraded to php4.4.0
tnx, and happy new year.
--Y
On 9/23/05, Uri Even-Chen <[EMAIL PROTECTED]> wrote:
Yedidia Klein wrote:
> Hello linux-il,
>
> I've a simple php script (see below) that write to a file the REQUEST
> METHOD that was used while calling this script.
>
> means that when I use a browser to access this script it write to the
> file "GET"
>
>
> The problem starts while I try for example to send an OPTION request to
> this script (using a simple perl script that is attached below)
>
> while trying on RH based linuxes the request get to the apache logs but
> not to the php script (means my script do not write anything to its file.
>
> but while trying on Debian based machines - the script *do* get all
> requests...
>
> I tried to compare the apache conf files and php.ini files w/o success...
>
>
> any idea how to get it work on RH based linux??
The problem might be in your Perl script. Try using wget instead. You
can use wget from command line to debug the script. Also, check the
complete URL and whether you have virtual hosts on the RH machine. It
might be the reason.
If you don't find the problem, you might want to write to one of the PHP
mailing lists...
Good luck!
Best Regards,
Uri Even-Chen
Speedy Net
Raanana, Israel.
E-mail: [EMAIL PROTECTED]
Phone: +972-9-7715013
Website: www.uri.co.il
--------------------------------------------------------
>
>
> --Y
>
>
> The scripts:
>
> req.pl
> #!/usr/bin/perl
>
> use HTTP::Headers;
> use LWP::UserAgent;
>
> my $request = new HTTP::Request(
> 'OPTIONS'=>"http://my.web.site/method.php" );
>
> my $ua = new LWP::UserAgent;
> my $response = $ua->request($request) || return "ERROR\t$!";
>
> print $response->server;
>
> -------
>
>
> method.php
> <?php
> $filename = '/var/www/html/method/method.log';
> $somecontent = $_SERVER["REQUEST_METHOD"]."\n";
>
> // Let's make sure the file exists and is writable first.
> #if (is_writable($filename)) {
>
> // In our example we're opening $filename in append mode.
> // The file pointer is at the bottom of the file hence
> // that's where $somecontent will go when we fwrite() it.
> if (!$handle = fopen($filename, 'a')) {
> echo "Cannot open file ($filename)";
> exit;
> }
>
> // Write $somecontent to our opened file.
> if (fwrite($handle, $somecontent) === FALSE) {
> echo "Cannot write to file ($filename)";
> exit;
> }
>
> echo "Success, wrote ($somecontent) to file ($filename)";
>
> fclose($handle);
> ?>
>
>
>
