php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14818 Error 405 and Can Not Find Server when executing any php script
Submitted: 2002-01-02 21:44 UTC Modified: 2006-12-20 11:55 UTC
From: lojekt at nwtc dot nt Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.1.0 OS: NT 4 SP 6
Private report: No CVE-ID: None
 [2002-01-02 21:44 UTC] lojekt at nwtc dot nt
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@email.com";

$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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-03 12:20 UTC] mfischer@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC