I'm new to Apache (and PHP) and was unable to find anything approaching an
answer to this problem in the Apache documentation. In fact, I'm not even
sure if I'm having a problem with Apache or with PHP. I am trying to use
sessions to track users on my site and write information to a file. I'm not
requiring them to login or anything - all I really want to know is which
users are visiting different pages on my site so I can judge the
effectiveness of my design. Anyway the problem is - I'm using the following
script:

<?
session_start();
session_register("origin");
session_register("ip_address");
session_register("browser");
session_register("$id");
$id = session_id();
$origin = "$HTTP_REFERER";
$ip_address = "$REMOTE_ADDR";
$browser = "$HTTP_USER_AGENT";
$sessn_root = "/***/sessn-log"; //substituted asteriks for actual path here
if(!file_exists("$sessn_root/$id.txt")):
        $sessn_data = "$id\n $ip_address\n $browser\n $origin\n";
else:
        $sessn_data = "$origin\n";
endif;
$fp = fopen("$sessn_root/$id.txt", "a");
fputs($fp, $sessn_data);
fclose($fp);
$includes = "***/includes"; //substituted asteriks for actual path here
$page = "$includes/index.inc";
include("$includes/template.html.php");
?>

and i get the following error:

Warning:
fopen("/home/tgmalone/sessn-log/0bbaf33ab1c1f9d714e2244459979ec7.txt","a") -
Permission denied in /home/tgmalone/public_html/index.php on line 17

The problem is obvious, but I've been searching, searching and wracking my
inadequate brain for a solution and can't find one - can anyone help me find
a solution/workaround?

Thanks,
Tom Malone


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to