0

hello all,
i have a problem. First off, i am able to upload 200mb to mysql database; so im good there. I changed the values in "my.ini" to 700mb. The problem is, when i try to download it, i get a error 404 or something like that. Its like the file is too big to download? but, i can downloads smaller files..
ok some code...
Display results page....

echo "<a onclick=\"go('download.php?id=".$row['id']."');\">Something</a>";

and of course the javascript "go" is:

function go(url) {
        location.href = url;
}

download.php..

<?php
if(isset($_GET['id'])) 
{
// if id is set then get the file with the id from database

include 'library/config.php';
include 'library/opendb.php'; 
$id    = $_GET['id'];
$query = "SELECT name, type, size, content " .
         "FROM upload WHERE id = '$id'";

$result = mysql_query($query) or die('Error, query failed');
list($name, $type, $size, $content) = mysql_fetch_array($result);

header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$name");
echo $content;

include 'library/closedb.php'; 
exit;
}

?>

So again, how can i increase my download limit?
Basically i got the whole code from PHP.MYSQL.TUTORIALS

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by cwarn23
0

Could you tell us what the $type variable contains as it may contain an invalid type header.

This topic has been dead for over six months. 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.