|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lojekt at nwtc dot nt
New email:
PHP Version: OS:


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


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

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

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



That one gives a 405 error.

Here is the upload script.

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



if($doupload) {

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

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

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

} else {

$num = 0;
while($num < $ADMIN['UploadNum']) {
$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> ";



The setup.php3 file is here:

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



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 or

I am lost and this is one of my last resorts.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-03 12:20 UTC]
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

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-2023 The PHP Group
All rights reserved.
Last updated: Sat Mar 25 15:03:41 2023 UTC