Page 1 of 1

Server error, unable to connect to fastcgi server ??????

Posted: Tue Jul 17, 2007 7:44 am
by Peuplarchie
Good day to you all,
I have a error when executing this script,can somebody help me ?

Here is the error :
Server error, unable to connect to fastcgi server


Here is the code :

Code: Select all

<script language="JavaScript" type="text/javascript" >
function changePic(fe){
var opt_key = fe.selectedIndex;
var fileName = fe.options[opt_key].value;
document.noimage.src=fileName;
return true;
}
</script>
<select name="image" onchange="changePic(this);">
  <option>[select a file]</option>
<?php
function PGL_ConfigList($dir)
{
    global $pattern, $files;
//
    if($open = opendir($dir))
    {
        while((boolean)($file = readdir($open)))
        {
            if(is_dir($file))
            {
                PGL_ConfigList($dir.'/'.$file);
            }
            else if(eregi($pattern, $file))
            {
                $files[] = $dir.'/'.$file;
            }
        }
    }
    closedir($open);
}
//
$pattern = '\.(jpg|jpeg|png|gif|bmp)$';
$files = array();
$dir = "Images/";
PGL_ConfigList($dir);
foreach($files AS $file)
{
    echo '  <option value="'.$file.'">'.$file.'</option>'."\n";
}
?>
</select>

Thanks!

Posted: Tue Jul 17, 2007 7:53 am
by feyd
I don't think PHP code has much to do with your error. The error would indicate something wrong with the configuration of the server.

Posted: Tue Jul 17, 2007 8:25 am
by Peuplarchie
is there a way to escape that problem you think ?
Another way of coding it ?