0

I have recently renovated the GFWR Software site at members.shaw.ca/gfwrsoftware. In former days, it easily allowed readers to download installer files for the freeware programs I write in Visual Basic 6. Now, however, WHEN PUBLISHED, an attempt at downloading causes an error stating "The website declined to show this page", etc. However, before publishing, when testing the website in three different browsers, the downloads commence as they should, with no problem at all. I used Dreamweaver CS4 to make the site, and I have no control whatsoever over the servers.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Senefelder
0

Looks for all the world like a permissions problem. If you have no control over the servers then you probably can't change the access permissions for the directory you are storing the files in either.

If you are sure that the permissions aren't the issue, you might try not just linking directly to the file but rather using readfile() to send it.

From http://php.net/manual/en/function.readfile.php

<?php
$file = 'monkey.gif';

if (file_exists($file)) {
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    ob_clean();
    flush();
    readfile($file);
    exit;
}
?>
0

SOLVED - I changed the files I was offering to download from .exe files to .zip files, and everything worked just fine. Thanks for trying.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.