Solved

"501 - Not Implemented" Problem

Posted on 2002-05-16
13
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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
 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

726 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