0

i have been trying to upload music file but the file will not upload but all the picture upload are successfully .

i need some help . i want to upload music file to a directory in my server but i have been having problems with it. unable to upload full mb song

3
Contributors
4
Replies
17
Views
3 Years
Discussion Span
Last Post by cereal
0

Sounds like you've reached the size limit. Check the contents of $_FILES array by placing this at the top of your upload script:

die(print_r($_FILES));

Then check the value of the index key error, if you get 0 there's no errors, so you will may want to paste your code here. If instead the value is different, for example 2 then it's a size problem and in this case you have to change some settings in your php.ini file, like upload_max_filesize, which by default is 2MB. For more information read these links:

0

i have done changes in php.ini file
its working fine on my localhost
but when i upload it to server the large song is not moved to the directory
it saves to database
but the small song like tune moves

0

The remote server needs to be reloaded otherwise it will not read the new settings in the php.ini file. Otherwise you can use ini_set():

<?php

    ini_set('upload_max_filesize', '20M');
    ini_set('memory_limit', '128MB');
    ini_set('max_execution_time', 180); # 3 minutes

By the way, do you get errors when you try with a big file? Have you checked the error log of the server?

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.