PHP: cannot upload bigger than 7mb

html_kid

New Member
hi , i found a script off google to upload files to my site from a form, but it wont upload biger than about 7 mb. can anybody help me.

Is there something wrong with my script?
Is there a diferent script thatyou reccomend using

PHP:
<?php 
if(!isset($_POST['upload'])) { 
?> 
<form name="upload" enctype="multipart/form-data" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> 
<input type="file" name="file" size="13" value=""> 
<br /><input type="submit" name="upload" value="Upload"> 
</form> 
<?php 
} else { 
$uploaddir = '/home/xboxlead/public_html/nav/upload/temp/'; 
$filename = $_FILES['file']['name']; 
$tmpname_file = $_FILES['file']['tmp_name']; 
$date_file = date(imdy); 
move_uploaded_file($tmpname_file, "$uploaddir$date_file$filename"); 
echo "Successful"; 
} 
?>
 

josevel

New Member
Hello,

your max upload size in set in apache's configuration file httpd.conf. If you don't have access to it you can set those values in a .htaccess file in your script's directory. Then set the following values:

<FilesMatch your_file.php>
php_value post_max_size "50M"
php_value upload_max_filesize "40M"
</FilesMatch>

Regards,
josevel
 
Top