$listconfigfile = "/home/sympa/expl/".$_GET['list']."/config";
echo "<P ALIGN=\"center\">".$listconfigfile."</P>\n";
$lines = @file($listconfigfile);
if($lines !== false)
{ // go through each line of the file
foreach ($lines as $line_num => $line)
{
list($config_option,$value) = split(' ', $line);
echo "<P ALIGN=\"center\">".$config_option." ".$value."</P>\n";
if($config_option == "filter") // found ldap filter line
{
echo "<P ALIGN=\"center\">Found it!</P>\n";
This code opens up a file on the system and reads it line by line, looking for a match.
This doesn't seem to be working. The file is owned by user x, and I think the script is being run as the apache user and is not able to open that file. Do I use something like php-cgiwrap to enable this script to open that file? I have been having a hard time finding documentation for php-cgiwrap.
Any advice appreciated.