same problem, did some research... no luck so far
I have the same exact issue. It looks to me like there is some problem with the attachment.php code or an include that is preventing the header() function calls from working.
The response headers never contain anything that the attachment.php is supposed to be setting.
The code does this...
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Type: $ctype");
$user_agent = strtolower ($_SERVER);
if ((is_integer(strpos($user_agent,"msie"))) && (is_integer(strpos($user_agent,"win"))))
{
header( "Content-Disposition: filename=".basename($filename).";" );
} else {
header( "Content-Disposition: attachment; filename=".basename($filename).";" );
}
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
but the actual response headers never include any of those values
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
I know that header() won't work if there is anything being outputted before the first header() is set. I checked and did find extra lines after the closing ?> brackets on the two include files staff.inc.php and ../main.inc.php but didn't help.
I can write my own php script to set headers and load an image using the same logic and it works... so there must be something specific to what ost is doing. Happens for me across IE, FF, Safari, windows or mac.
I will be looking to create a work around... I just need a simple way to view what the user attached, may put the attachments folder outside of ost and just create a link to the file and let browser/apache figure out the rest.