# Thread: Help needed to set up Log Dir

1. Active Member
Join Date
May 2009
Posts
4

## Help needed to set up Log Dir

We are trying, unsuccessfully, to set up a log file to capture the information of those who register to a log file. Below is how we have currently have the $LOGDIR entry. The log.txt file is rw-rw-rw permission but still no record made of form mail entries. ********************************************************************* // // ** OPTIONAL ** // Set LOGDIR to the directory on your server where log files are // stored. When the form provides a 'logfile' value, formmail.php // expects the file to be in this directory. // Generally you want this to be outside your server's WWW directory. // For example, if your server's root (WWW) directory is: // /home/yourname/www // use a directory like // /home/yourname/logs // // If you don't want to support log files, make this an empty string: //$LOGDIR = "";
//
// The log file simply contains a log of FormMail activity. It contains
// the date/time, the form user's real name, their email address, and
// the value of the "subject" field on the form.
//
// One use for the log file is for auditing: you can
// check the number of successful form submissions and when they occurred.
// You might use this, for example, to verify that a day's work has been
//
// FormMail user AlecRaenos told us how he uses the log file:
// We keep "lead" counts and this log file will be a HUGE help
// to us to determine:
// 1) if our server is sending out all the processed forms -we
// have had trouble with this and
//
// You might find other uses, if so, please let us know.
//
// NOTE: you'll need to create the log file on your server and make
// it writable by the web server software. For security reasons,
// FormMail cannot do this for you.
// In general, the correct permissions for your log file are:
// rw-rw-rw-
//
// NOTE: on Windows servers, use '/' instead of '\' or double the
// '\' like this:
// "d:\\path\\to\\logs"
// or
// "d:/path/to/logs"
//
$LOGDIR = "/www.fatherhoodcoalition.org/cpf/MailLog/log.txt"; // directory for log files; empty string to // disallow log files 2. Valuable Member Join Date May 2008 Posts 1,291 ## Re: Help needed to set up Log Dir Have you got this working yet? Did you provide the "logfile" setting in your form? You didn't mention it, but it should look like: Code: <input type="hidden" name="logfile" value="log.txt" /> Also, the$LOGDIR setting doesn't look right. Did you run test alert to get the server path to your document root? Start by doing that, then add the rest of the path to your MailLog directory (don't include the file name in this setting, just the directory that holds your log.)

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•