• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help me in uploading video clips using CI

#1
[eluser]Zeeshan Rasool[/eluser]
Hi , Is there any guy who help me in uploading video files using CI...............
Code is,
$config['upload_path'] = './resources/admin_videos';
$config['allowed_types'] = 'mp3';
$config['max_size'] = '500000';
$config['overwrite'] = false;

$this->upload->initialize($config);
$this->load->library('upload', $config);
if(!$this->upload->do_upload($video))
{
$error = array('error' => $this->upload->display_errors());
return $error;
}
else
{
$data = array('upload_data' => $this->upload->data());
$video_path =$data['upload_data']['file_name'];

}


Error:
The uploaded file exceeds the maximum allowed size in your PHP configuration file
Also included:
‘mp3’ => array(’audio/mpeg’, ‘audio/mpg’)but no result.

Any guy who know the solu.


..............JamZee

#2
[eluser]bugboy[/eluser]
It seems like the file your uploading is exceeding the amount the host/server has set for it.

Try using a CGI/perl script like:

http://www.sibsoft.net/xupload.html

I've got this working pretty fine and it needs to be style up better but it does the trick.

I would post my code i'm just in a bit of a rush at min

#3
[eluser]Référencement Google[/eluser]
This is a php.ini configuration problem. You could extend it (if your host allow it) by a htaccess or by using a php_ini directive in your php code. If your videos are real that big, then you can as suggested use a cgi program or a Java upload program.

For the php.ini you have to check about those configurations:
- post_max_size
- memory_limit
- upload_max_filesize

Also please, while you post code on the forums, wrap it with the [code] tags

#4
[eluser]Zeeshan Rasool[/eluser]
thnx bugboy,
plz im waiting for your code.
i change upload_max_filesize to 20M in php.ini
i have changed my cy php.ini file but in phpinfo it shows still upload_max_filesize = 2M

#5
[eluser]Référencement Google[/eluser]
[quote author="ZeEsHaN RaSoOL" date="1214473779"]thnx bugboy,
plz im waiting for your code.
i change upload_max_filesize to 20M in php.ini
i have changed my cy php.ini file but in phpinfo it shows still upload_max_filesize = 2M[/quote]

You may reboot your server if you own it (dedicated server). If you are on a shared host, tell us what you do and post your htaccess or code otherwise it's impossible to help you.

#6
[eluser]JoostV[/eluser]
In php.ini change
Code:
post_max_size = 20M
upload_max_filesize = 20M

Then restart your Apache via the command line:
Code:
httpd -k restart

Changes do not have any effect until you restart your webserver.

You may also have to alter
- max_input_time
- max_execution_time
- memory_limit (careful with this one, if several uploads are being handled concurrently all available memory will be used up and other unrelated scripts that consume a lot of memory might effect the whole server as well


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.