Solved

"501 - Not Implemented" Problem

Posted on 2002-05-16
13
309 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

759 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

19 Experts available now in Live!

Get 1:1 Help Now