|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have create an guest form in a htm page. When submitting the data a asp
page is called to write the data to msaccess. When submitting i got the following error in apache Method Not Allowed The requested method POST is not allowed for the URL /form_ac.asp. -------------------------------------------------------------------------------- Apache/1.3.23 Server at localhost Port 80 Who can me to solve this problem I think it's an apache problem but how to config apache correct?? Form 1 --------------------------------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <style> td { font-size : 8pt; font-family : Verdana, Arial; text-decoration : none; } body { font-size : 8pt; font-family : Verdana, Arial; text-decoration : none; } input { font-size : 8pt; font-family : Verdana, Arial; height : 17; } </style> </head> <body> <form action="form_ac.asp" method="post"> <p align="center"><b>HTML Form Page:</b></p> <table align="center" border=0 cellpadding=3 cellspacing=3 cols=2 width=400> <tr> <td align="right" height=10 valign="top">Name :</td> <td align="left" height=10 valign="top" width=250><input type="text" name="name"></td> </tr> <tr> <td align="right" height=10 valign="top">Email :</td> <td align="left" height=10 valign="top" width=250><input type="text" name="email"></td> </tr> <tr> <td align="right" height=10 valign="top">Country :</td> <td align="left" height=10 valign="top" width=250><input type="text" name="country"></td> </tr> <tr> <td align="right" height=10 valign="top">Comments :</td> <td align="left" height=10 valign="top" width=250><textarea cols=20 rows=5 name="comments"></textarea></td> </tr> <tr> <td align="right" height=10 valign="top"></td> <td align="left" height=10 valign="top" width=200><input type="submit" value=" "> Submit -></td> </tr> </table> </form> </body> </html> --------------------------------------- form 2 asp page <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> </head> <body> <% ' Declaring variables Dim name, email, country, comments, data_source, con, sql_insert ' A Function to check if some field entered by user is empty Function ChkString(string) If string = "" Then string = " " ChkString = Replace(string, "'", "''") End Function ' Receiving values from Form name = ChkString(Request.Form("name")) email = ChkString(Request.Form("email")) country = ChkString(Request.Form("country")) comments = ChkString(Request.Form("comments")) data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("form.mdb") sql_insert = "insert into users (name, email, country, comments) values ('" & _ name & "', '" & email & "', '" & country & "', '" & comments & "')" ' Creating Connection Object and opening the database Set con = Server.CreateObject("ADODB.Connection") con.Open data_source con.Execute sql_insert ' Done. Close the connection con.Close Set con = Nothing Response.Write "All records were successfully entered into the database." %> </body> </html> |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On May 9, 9:11 pm, "joost" <nore...@home.nl> wrote:
> I have create an guest form in a htm page. When submitting the data a asp > page is called to write the data to msaccess. When submitting i got the > following error in apache > > Method Not Allowed > The requested method POST is not allowed for the URL /form_ac.asp. > > -------------------------------------------------------------------------------- > > Apache/1.3.23 Server at localhost Port 80 > > Who can me to solve this problem > > I think it's an apache problem but how to config apache correct?? > > Form 1 > --------------------------------------------------------------------------------- > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <html> > <head> > <style> > td { font-size : 8pt; font-family : Verdana, Arial; text-decoration : > none; } > body { font-size : 8pt; font-family : Verdana, Arial; text-decoration : > none; } > input { font-size : 8pt; font-family : Verdana, Arial; height : 17; } > </style> > </head> > > <body> > <form action="form_ac.asp" method="post"> > <p align="center"><b>HTML Form Page:</b></p> > <table align="center" border=0 cellpadding=3 cellspacing=3 cols=2 width=400> > <tr> > <td align="right" height=10 valign="top">Name :</td> > <td align="left" height=10 valign="top" width=250><input type="text" > name="name"></td> > </tr> > <tr> > <td align="right" height=10 valign="top">Email :</td> > <td align="left" height=10 valign="top" width=250><input type="text" > name="email"></td> > </tr> > <tr> > <td align="right" height=10 valign="top">Country :</td> > <td align="left" height=10 valign="top" width=250><input type="text" > name="country"></td> > </tr> > <tr> > <td align="right" height=10 valign="top">Comments :</td> > <td align="left" height=10 valign="top" width=250><textarea cols=20 rows=5 > name="comments"></textarea></td> > </tr> > <tr> > <td align="right" height=10 valign="top"></td> > <td align="left" height=10 valign="top" width=200><input type="submit" > value=" "> Submit -></td> > </tr> > </table> > </form> > > </body> > </html> > --------------------------------------- > form 2 asp page > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <html> > <head> > </head> > > <body> > <% > ' Declaring variables > Dim name, email, country, comments, data_source, con, sql_insert > > ' A Function to check if some field entered by user is empty > Function ChkString(string) > If string = "" Then string = " " > ChkString = Replace(string, "'", "''") > End Function > > ' Receiving values from Form > name = ChkString(Request.Form("name")) > email = ChkString(Request.Form("email")) > country = ChkString(Request.Form("country")) > comments = ChkString(Request.Form("comments")) > > data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ > Server.MapPath("form.mdb") > sql_insert = "insert into users (name, email, country, comments) values > ('" & _ > name & "', '" & email & "', '" & country & "', '" & comments & > "')" > > ' Creating Connection Object and opening the database > Set con = Server.CreateObject("ADODB.Connection") > con.Open data_source > con.Execute sql_insert > ' Done. Close the connection > con.Close > Set con = Nothing > Response.Write "All records were successfully entered into the database." > %> > > </body> > </html> you havent told use anything about the setup, os, or paths, and nothing about the configuration so I got out my crystal ball and this is all I could see you possibly have something like <Limit CONNECT ... PROPFIND.....POST ....> Order allow,deny <Limit> it might use <LimitExcept> instead anyway remove the POST verb if it is there. |
|
![]() |
| Outils de la discussion | |
|
|