access denied

2010-09-16
2013-04-25
  • Hello,
    It's my error message "access denied
    you do not have permission to access this directory" when I download images in some directory it works but others do not.
    Please, you have an idea of the cause of the problem ?

     
  • More informations
    The page called "file_download.php" the application below returns 2 elements.
    Consequently this code gives an access denied
    /**
    * get file infos
    */
    $sql = sql_query_str(
    array('filename','prev_path','md5sum'),
    P.".id='".linpha_addslashes($_GET)."'",
    $order_by='',
    $additional_tables=Array()
    );

    echo "AAA : $sql";

    $query = $GLOBALS->Execute($sql);

    /**
    * security
    *
    * sql_query_str() returns no result if we are not allowed to view the image
    */
    if($query->RecordCount() != 1)
    {
    include(language_file());
    echo STR_ACCESS_DENIED;
    exit(1);
    }

    But in the table named "linpha_photos" there is only one match id