PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > [Apache 2.0] Parameters of POST method in Custom Logfile
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

[Apache 2.0] Parameters of POST method in Custom Logfile

Réponse
 
LinkBack Outils de la discussion
Vieux 07/02/2005, 15h21   #1
Christian Meisl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut [Apache 2.0] Parameters of POST method in Custom Logfile

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
  Réponse avec citation
Vieux 07/02/2005, 18h05   #2
Dan Wilga
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [Apache 2.0] Parameters of POST method in Custom Logfile

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 **
  Réponse avec citation
Vieux 07/02/2005, 21h51   #3
Jim Hayter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [Apache 2.0] Parameters of POST method in Custom Logfile

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h58.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09220 seconds with 11 queries