My name is Bong, James Bong
Posts: 11
74 credits Members referred : 0
« on: Sep 18, 2006, 08:27:28 am »
I downloaded your php class and i have a form that uploads an mp3 to the server and it's ok for like under 2mb but then if it's bigger it gives me this
The uploaded file exceeds the max. upload filesize directive in the server configuration.
i set the max upload size to 50mb in the script. any idea whats wrong here?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Sep 18, 2006, 08:57:25 am »
don't use this kind of high value...
you have also to raise the post_max_size and this value in the example script:
$max_size = 1024*250; // the max. size for uploading in bytes
the hidden tag <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_size; ?>">
must be the first element in your form
Global Moderator
Internet Junkie
Gender:
Posts: 1525
6359 credits Members referred : 8
Gimme all your cookies!!!
« Reply #2 on: Sep 18, 2006, 08:59:15 am »
If you're using php, you will have to update your php.ini to allow bigger files to be uploaded. The default is usually 2M in php. Check: upload_max_filesize = 2M
If you're using php, you will have to update your php.ini to allow bigger files to be uploaded. The default is usually 2M in php. Check: upload_max_filesize = 2M
Thanks Wineo (I should better read) If you don't have access to the php config you can try to change this values via htaccess:
just put this in a .htaccess in the folder:
Code:
php_value upload_max_filesize {new_bytes_max}
My name is Bong, James Bong
Posts: 11
74 credits Members referred : 0
If you're using php, you will have to update your php.ini to allow bigger files to be uploaded. The default is usually 2M in php. Check: upload_max_filesize = 2M
Thanks Wineo (I should better read) If you don't have access to the php config you can try to change this values via htaccess:
just put this in a .htaccess in the folder:
Code:
php_value upload_max_filesize {new_bytes_max}
so do i just create a .htaccess file and put that code directly into it? or should i change the new_bytes_max to something?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@maliciousmetal.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
at the top of your script, instead of the .htaccess change.
Try this... else you may have to alter the php.ini file. Remember though that we were never meant to upload such big file sizes this way and I am sure that with some server setups you may run into some problems trying to upload files bigger than about 30M.
My name is Bong, James Bong
Posts: 11
74 credits Members referred : 0
« Reply #10 on: Sep 19, 2006, 01:38:35 pm »
i tried putting that at the top but i got The uploaded file exceeds the max. upload filesize directive in the server configuration. again
The file was only 4mb. Any idea how to change the php.ini file? i couldnt find it through my ftp program.
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
« Reply #11 on: Sep 19, 2006, 01:43:48 pm »
if you are on shared hosting I don't think you will be able to change it. You could try asking your webhost company if they want to change it for you...