From:             [EMAIL PROTECTED]
Operating system: NT 4 SP 6
PHP version:      4.1.0
PHP Bug Type:     IIS related
Bug description:  Error 405 and Can Not Find Server when executing any php script

I just rebuilt my NT 4 SP 6 IIS server and now the PHP doesn't work.  It
gives me a 405 Resource Not Allowed error whenever I try to use a simple
e-mail script or an upload script with small files.

Here is the script that I am using for my mail.

----------------------------------------------------
<?php

$msg = "First Name:\t\t$fname\n";
$msg .= "Last Name:\t\t$lname\n\n";
$msg .= "Physical Address:\t$paddress\n";
$msg .= "Subdivision:\t\t$sub\n";
$msg .= "Phone Number:\t$acode-$phone\n";
$msg .= "Mailing Address:\t$maddress\n";
$msg .= "City:\t\t\t$city\n";
$msg .= "State:\t\t\t$state\n";
$msg .= "------------------------------------------------------\n";
$msg .= "Operating System:\t$os";

$recipient = "[EMAIL PROTECTED]";

$subject = "Site Survey Request for $fname $lname";

mail($recipient, $subject, $msg);

php?>


---------------------------------------------------------

That one gives a 405 error.


Here is the upload script.

----------------------------------------------------------
<HTML>
<HEAD>
  <TITLE>Atlas upload script</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff" TEXT="#ffffff">

<php?

require("setup.php3");

if($doupload) {

$num = 0;
while($num < $ADMIN['UploadNum']) {
$num++;

$file = "fileup1"."_name";
$file1 = $$file;
$file2 = "fileup1";
$file3 = $$file2;

if($file3 != "none") { 
$filesizebytes = filesize($file3);

if(file_exists("$ADMIN[directory]/$file1") OR $ok == 2) {
$error .="File name already exists for file $num<br>";
} else {
copy ($file3, "$ADMIN[directory]/$file1");
$error .="Thank You!  Your file has been uploaded.<BR>";
}
}
}

echo("<P><CENTER><B><FONT FACE=\"Verdana\"
color=\"#000000\">Status</FONT></B></CENTER></P>

<P><CENTER><TABLE WIDTH=\"450\" BORDER=\"0\" CELLSPACING=\"0\"
CELLPADDING=\"0\">
  <TR>
    <TD WIDTH=\"100%\" BGCOLOR=\"#000000\">
      <TABLE WIDTH=\"450\" BORDER=\"0\" CELLSPACING=\"1\"
CELLPADDING=\"2\">
        <TR>
          <TD COLSPAN=\"2\" BGCOLOR=\"#ffffff\">
            <FONT COLOR=\"#000000\" SIZE=\"-1\"
FACE=\"Verdana\"><center>$error</center></FONT>
          </TD>
        </TR>
      </TABLE>
    </TD>
  </TR>
</TABLE></CENTER></P>
<A HREF=\"default.htm\">Click here</A><FONT COLOR=\"black\"> to go back to
the main page.</FONT>
</BODY>
</HTML>");
exit();

} else {

$num = 0;
while($num < $ADMIN['UploadNum']) {
$num++;
$html .= "<TR>
        <TD WIDTH=\"25%\" BGCOLOR=\"#295e85\">
        <FONT COLOR=\"#ffffff\" SIZE=\"-1\" FACE=\"Verdana\">File
$num:</FONT></TD> 
        <TD WIDTH=\"75%\" BGCOLOR=\"#ffffff\">
        <INPUT NAME=\"fileup$num\" TYPE=\"file\" SIZE=\"25\">
</TD> ";
}

php?>

----------------------------------------------------

The setup.php3 file is here:
----------------------------------------------------
<?php

$ADMIN['UploadNum'] = "1";
$ADMIN['directory'] = "X:/web/atlas"

'php'?>

---------------------------------------------------



I am using a HTML form to post to these using multi-part/form-data for the
enctype.


I did cut out some echo stuff to shorten up the message, but even without
them, I get the error.

You can see the error by going to http://www.newwaveis.com/survey.htm or
http://www.atlasreproduction.com/upload.htm


I am lost and this is one of my last resorts.
-- 
Edit bug report at: http://bugs.php.net/?id=14818&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to