|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Is there any possibility to log the POST parameters a script gets via
Apache? Unfortunately I haven't found any switch for the LogFormat directive. My problem is as follows: I have the following code on my homepage: <form action="mail.php" method="POST"> .... <input type="hidden" name="funk" value="send"> <input name="address" size="20"> .... </form> I'd like to have the values of the "funk" and "address" fields in the Apache log file. Can this be done? And if yes, how? Regards, Christian -- Univ.-Ass. Dipl.-Ing. Dr. Christian Meisl Graz University of Technology Inst. for Chemical Apparatus Design, Particle Technology and Combustion Inffeldgasse 25/B, A-8010 Graz, Austria Phone: +43 (316) 873-7495 | Fax: +43 (316) 873-7492 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
In article <4207797f$0$10578$3b214f66@aconews.univie.ac.at> ,
Christian Meisl <christian.meisl@tugraz.at> wrote: > Is there any possibility to log the POST parameters a script gets via > Apache? Unfortunately I haven't found any switch for the LogFormat > directive. > > My problem is as follows: I have the following code on my homepage: > > <form action="mail.php" method="POST"> Personally, I don't think this is a very good idea, even if it was easy to do. It would be quite easy for a malicious person to flood your form with tons of useless POST data, quickly filling up your log file partition. You're much better off putting diagnostic strings into your PHP script, mail.php. Find a place after the headers have been sent, and echo the form variables, or fwrite them to a file somewhere. -- Dan Wilga dwilga-MUNGE@mtholyoke.edu ** Remove the -MUNGE in my address to reply ** |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Mon, 07 Feb 2005 15:21:51 +0100, in
comp.infosystems.www.servers.unix, Christian Meisl <christian.meisl@tugraz.at> wrote: >Is there any possibility to log the POST parameters a script gets via >Apache? Unfortunately I haven't found any switch for the LogFormat >directive. Not as far as I know. <snip form> >I'd like to have the values of the "funk" and "address" fields in the >Apache log file. Can this be done? And if yes, how? You can have your script write the posted values into environmental variables and then log the environmental variables - \"%{FOOBAR}e\" will add the value of FOOBAR to the log. Jim |
|
![]() |
| Outils de la discussion | |
|
|