So what I am trying to do is create some scripts to manage my majordomo lists. The problem that I am runing into is that I can't open my list files up.
For example I have this code for adding a user to a approved file:
<?
ini_set('include_path', '/var/lib/majordomo/lists/');
If ($submitnewemail) {
//write the file
$thefile = '/var/lib/majordomo/lists/'.$list.'.approved';
$fp = fopen($thefile, 'a', 1);
fwrite($fp, $email);
fclose($fp);
print "<B>$email</B> was added to the approved senders list.";
}
?>
I get the following errors:
Warning: fopen(/var/lib/majordomo/lists/lowaneuallanque.approved): failed to open stream: Permission denied in /home/virtual/site122/fst/var/www/html/majordomo/approved.php on line 7
Warning: fwrite(): supplied argument is not a valid stream resource in /home/virtual/site122/fst/var/www/html/majordomo/approved.php on line 8
Warning: fclose(): supplied argument is not a valid stream resource in /home/virtual/site122/fst/var/www/html/majordomo/approved.php on line 9
I have the file permissions that I am trying to edit as 777 and the directory is also 777.
What could I be doing wrong? Is there some stupid little setting I am missing? Please let me know.
Thanks!