Solved

"501 - Not Implemented" Problem

Posted on 2002-05-16
13
310 Views
Last Modified: 2008-03-17
I'm doing a real simply UserID & PWD posting. This is running on a Unix box that has PHP3.

The post page is like this:
<?php if ($txtUserID=="Guest" && $txtPWD=="NewUser") {
?>
SHOW THIS DATA
<? } else {?>
TELL THEM THEY CAN'T SEE DATA
<? }?>

But I keep getting the error message ->

"We are sorry to be unable to perform the method POST at this time or to this document."
0
Comment
Question by:tyy8
  • 5
  • 5
  • 2
  • +1
13 Comments
 
LVL 5

Expert Comment

by:andriv
ID: 7015326
I know it's a dumb question but it's a possibility: Is the action in the form going to a file with the .php extension?

You usually get this error if you actidently submitting to a .html file.
0
 
LVL 4

Expert Comment

by:lokeshv
ID: 7015465
cna u post ur code here ?


Lk
0
 
LVL 8

Expert Comment

by:us111
ID: 7015637
?? more info pls
0
 

Author Comment

by:tyy8
ID: 7017122
I am posting to the correct page. The posting page just sends the UserID and PWD.
0
 
LVL 4

Expert Comment

by:lokeshv
ID: 7017286
can u post ur code here ?


Lk
0
 

Author Comment

by:tyy8
ID: 7017537
Here is the form - it's the only thing on the page (the code for the receiving User.php3 is above ->

<form name="frmLogin" action="User.php3" method="post">
<table>
<tr>
  <td>User Name: </td>
  <td><input type="text" name="txtUser"></td>
</tr>
<tr>
  <td>Password: </td>
  <td><input type="password" name="txtPWD"></td>
 </tr>
 <tr>
  <td align="center"><input type="button" name="cmdSubmit" value="Submit"  onclick="cmdSubmit_onClick()"></td>
  <td align="center"><input type="reset" name="cmdReset" value="Clear"></td>
 </tr>
</table>
</form>
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:tyy8
ID: 7017556
Okay, this is strange.

Using the above code - if I go thru the "submitting" page -I get the error I described above, but if I just go directly to the .php3 page (and skip the submission) - it SHOWS the data that I want to hide from users unless they've entered a correct UserID & PWD.
0
 
LVL 4

Expert Comment

by:lokeshv
ID: 7017944



<td align="center"><input type="button" name="cmdSubmit" value="Submit"  onclick="cmdSubmit_onClick()">

and what ur cmdSubmit_onClick() is ?? form validation ??

try this ..

form name="frmLogin" action="User.php3" method="post" onSubmit="return ValidateForm();">
<table>
<tr>
 <td>User Name: </td>
 <td><input type="text" name="txtUser"></td>
</tr>
<tr>
 <td>Password: </td>
 <td><input type="password" name="txtPWD"></td>
</tr>
<tr>
 <td align="center"><input type="submit" name="cmdSubmit" value="Submit"></td>
 <td align="center"><input type="reset" name="cmdReset" value="Clear"></td>
</tr>
</table>
</form>



Hope this helps..

Lk
0
 
LVL 8

Expert Comment

by:us111
ID: 7023373
check the post_max_size into the php.ini
0
 

Author Comment

by:tyy8
ID: 7024971
Okay, the host company says that everything has to be in the cgi/bin - but I've never done it that way, I've always embedded my script into the page - so I haven't a clue how the other way works. Does anybody know how my simple code would work with the cgi/bin????
0
 
LVL 4

Expert Comment

by:lokeshv
ID: 7025906
change ur file extensions to cgi and on top of every file..

add

#!/usr/bin/php  //path to binary ask ur hosting..


Hope this helps..

LK
0
 

Author Comment

by:tyy8
ID: 7027621
Last thing....

Does the php file have to reside within the cgi/bin folder or can you put it anywhere on the site?
0
 
LVL 4

Accepted Solution

by:
lokeshv earned 50 total points
ID: 7027633
have to be in cgi-bin directory...


Lk
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mimic google as my ip 11 53
Password forgotten. 3 39
.php tree directory? 5 54
hiding/removing php extension - best practice 4 24
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now