httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yedidia Klein <>
Subject [users@httpd] Passing non GET/POST request methods to php script do not work on Fedora/RH
Date Mon, 26 Sep 2005 13:43:40 GMT
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 OPTIONS request to 
this script (using a simple perl script that I wrote and is attached)
while trying on Fedora/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 linuxes - the script *do* get all 
I tried to compare the apache conf files and php.ini files w/o success...
any idea how to set apache to pass these requests to my script ??



the scripts:

use HTTP::Headers;
use LWP::UserAgent;

my $request = new HTTP::Request(
'OPTIONS'=>"" );

my $ua = new LWP::UserAgent;
my $response = $ua->request($request) || return "ERROR\t$!";

print $response->server;



| |
$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)";

  // Write $somecontent to our opened file.
  if (fwrite($handle, $somecontent) === FALSE) {
      echo "Cannot write to file ($filename)";

  echo "Success, wrote ($somecontent) to file ($filename)";

?> |

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message