| | |
Mp3 file upload problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#11 Nov 4th, 2009
try with another mp3 file having small size and post your entire code here.
and you seem to be confused, first decide which file types you want to restrict and which file types you want to allow.accordingly we will proceed with the code.
and you seem to be confused, first decide which file types you want to restrict and which file types you want to allow.accordingly we will proceed with the code.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Aug 2008
Posts: 161
Reputation:
Solved Threads: 6
0
#12 Nov 4th, 2009
•
•
•
•
try with another mp3 file having small size and post your entire code here.
and you seem to be confused, first decide which file types you want to restrict and which file types you want to allow.accordingly we will proceed with the code.
hi...
this is my code...its working fine for all(including MP3)...but upto 5MB files only uploaded..8,9,11MB files are not uploaded..
PHP Syntax (Toggle Plain Text)
$aid = mysql_real_escape_string($_POST['albumname']); $song = mysql_real_escape_string($_POST['song']); $singers = mysql_real_escape_string($_POST['singers']); $tname = mysql_real_escape_string($_FILES["tphoto"]["name"]); $ttmp_name = $_FILES["tphoto"]["tmp_name"]; //Audio File Uploading.... //if (($_FILES["tphoto"]["type"] == "*.MP3")){ //not working when i use if condition.. $dir="../../music/$aid"; move_uploaded_file($ttmp_name,"$dir"."/"."$tname"); $sql="insert into music_songs values('','$aid','$song','$singers','$tname')"; $res=mysql_query($sql)or die(mysql_error()); //}
another one...now i m working on localhost....
My best wishes ... from my soul ... for everyone!
Keep Smiling....Never Depress
Keep Smiling....Never Depress
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#13 Nov 4th, 2009
is "audio/mp3" and "MP3" same for you ?
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Aug 2008
Posts: 161
Reputation:
Solved Threads: 6
0
#14 Nov 4th, 2009
HI..
this is not same....by mistake i put the code as ( *.MP3)... basically i checked for (audio/mp3)...its not working when i put condition there...not only for MP3...
its not working for all types of files when i use if conditon..k...also plz tell me how can i solve the MAX SIZE problem ..
My best wishes ... from my soul ... for everyone!
Keep Smiling....Never Depress
Keep Smiling....Never Depress
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#15 Nov 4th, 2009
Again you seem to be confused.This time you are having problem with all the file types.
The max size can be set in the php.ini as, search for "upload_max_filesize" .It may have default value of 2MB at the moment edit it to have whatever you like.
The max size can be set in the php.ini as, search for "upload_max_filesize" .It may have default value of 2MB at the moment edit it to have whatever you like.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Aug 2008
Posts: 161
Reputation:
Solved Threads: 6
0
#16 Nov 5th, 2009
•
•
•
•
Again you seem to be confused.This time you are having problem with all the file types.
The max size can be set in the php.ini as, search for "upload_max_filesize" .It may have default value of 2MB at the moment edit it to have whatever you like.
Hi Network18,
You r correct..at that time it takes all types of files...k leave it...
I am having doubt on "upload_max_filesize" ..how can i change the values in php.ini file(which is located in server)...plz tell me is there any way to do by using coding????
i think this is stupid question, but no chance to me...
Thanks in advance..
My best wishes ... from my soul ... for everyone!
Keep Smiling....Never Depress
Keep Smiling....Never Depress
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#17 Nov 5th, 2009
•
•
•
•
Hi Network18,
You r correct..at that time it takes all types of files...k leave it...
I am having doubt on "upload_max_filesize" ..how can i change the values in php.ini file(which is located in server)...plz tell me is there any way to do by using coding????
i think this is stupid question, but no chance to me...
Thanks in advance..
PHP Syntax (Toggle Plain Text)
//This is your new size $new_size = '3M'; ini_set('upload_max_filesize',$new_size);
And don't worry, nothing is stupid, until you don't know it

its always good to clarify the doubts here.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Aug 2008
Posts: 161
Reputation:
Solved Threads: 6
0
#18 Nov 5th, 2009
•
•
•
•
Yes, you can do that by function ini_set()-
most of the properties in the php.ini can be set during runtime using ini_set() function.The new values last there till the script executes.PHP Syntax (Toggle Plain Text)
//This is your new size $new_size = '3M'; ini_set('upload_max_filesize',$new_size);
And don't worry, nothing is stupid, until you don't know it
its always good to clarify the doubts here.
Hey...
Thanks to all....once again thanks a lot...keep it up...
My best wishes ... from my soul ... for everyone!
Keep Smiling....Never Depress
Keep Smiling....Never Depress
•
•
Join Date: Aug 2008
Posts: 161
Reputation:
Solved Threads: 6
0
#19 Nov 5th, 2009
hi sir,
This time i m getting warning
i fixed the
the uploading file size is 9 to 10 MB...
This time i m getting warning
•
•
•
•
PHP Warning: POST Content-Length of 9484737 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
PHP Syntax (Toggle Plain Text)
$new_size = '20M'; ini_set('upload_max_filesize',$new_size);
the uploading file size is 9 to 10 MB...
My best wishes ... from my soul ... for everyone!
Keep Smiling....Never Depress
Keep Smiling....Never Depress
•
•
Join Date: Sep 2009
Posts: 557
Reputation:
Solved Threads: 64
0
#20 Nov 5th, 2009
•
•
•
•
hi sir,
This time i m getting warning
i fixed the
PHP Syntax (Toggle Plain Text)
$new_size = '20M'; ini_set('upload_max_filesize',$new_size);
the uploading file size is 9 to 10 MB...
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
![]() |
Similar Threads
- problem with the file upload dialog (C#)
- File upload problem (PHP)
- File Upload Servlet problem (JSP)
- file upload script for music files and video files (PHP)
- File upload - advanced help (PHP)
- file upload code.....need attention (PHP)
- File upload problem (PHP)
Other Threads in the PHP Forum
- Previous Thread: Google pagerank and alexa php style stats on domain pages..
- Next Thread: radiobutton with textarea
Views: 1572 | Replies: 39
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl customizableitems database date development directory display download dynamic echo email error file files folder form forms forum function functions google headmethod href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail malfunctioning menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





