Post by tv_boy123 » Sat Mar 07, 2009 2:00 am

How can I increase the size that files can be uploaded for the download section?
When trying to upload a new file that can be downloaded at:
http://www.awebsitename.com/admin/index ... g/download
it works with files less than 10MB, I want to be able to increase the file size up to around 50MB so customers can download some files that are bigger than 10MB.

However, when i try to upload files greater than 10MB i get several errors on this page:
http://www.awebsitename.com/admin/index ... oad/insert
Below are the errors that are listed:

Code: Select all

Notice: Undefined index: download_description in /home/content/e/n/o/awebsitename/html/admin/controller/catalog/download.php on line 342

Warning: Invalid argument supplied for foreach() in /home/content/e/n/o/awebsitename/html/admin/controller/catalog/download.php on line 342

Notice: Undefined index: download in /home/content/e/n/o/awebsitename/html/admin/controller/catalog/download.php on line 348

Notice: Undefined index: download in /home/content/e/n/o/awebsitename/html/admin/model/catalog/download.php on line 4

Notice: Undefined index: download in /home/content/e/n/o/awebsitename/html/admin/model/catalog/download.php on line 10

Notice: Undefined index: remaining in /home/content/e/n/o/awebsitename/html/admin/model/catalog/download.php on line 10

Notice: Undefined index: download_description in /home/content/e/n/o/awebsitename/html/admin/model/catalog/download.php on line 14

Warning: Invalid argument supplied for foreach() in /home/content/e/n/o/awebsitename/html/admin/model/catalog/download.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/n/o/awebsitename/html/admin/controller/catalog/download.php:342) in /home/content/e/n/o/awebsitename/html/system/engine/controller.php on line 23
Any help would be greatly appreciated, thanks.
I'm pretty sure I have to change some code in the file located in admin\controller\catalog\download.php could someone help me?

Newbie

Posts

Joined
Sat Mar 07, 2009 12:18 am
Location - London, United Kingdom

Post by liquidpele » Mon Mar 09, 2009 9:30 pm

This is a php setting. See here:

http://drupal.org/node/97193
Depending on your host, changing these two PHP variables can be done in a number of places with the most likely being php.ini or .htaccess (depending on your hosting situation).

For example, to increase the limit on uploaded files to 10 MB:

* Add the below to the relevant php.ini file (recommended, if you have access). Note that for some hosts this is a system-wide setting. However, for hosts running PHP as a CGI script with suexec (for example) you may be able to put these directives in a php.ini file in your Drupal root directory.
o upload_max_filesize = 10M ;
o post_max_size = 20M ;
* Add the below to your .htaccess file in the you Drupal root directory.
o php_value upload_max_filesize 10M
o php_value post_max_size 20M

New member

Posts

Joined
Mon Feb 23, 2009 11:58 pm

Post by tv_boy123 » Mon Mar 09, 2009 9:36 pm

Thank you so much liquidpele for your reply! I'll give it a go :)

Newbie

Posts

Joined
Sat Mar 07, 2009 12:18 am
Location - London, United Kingdom

Post by tv_boy123 » Mon Mar 09, 2009 10:54 pm

Thanks for your help. I tried what you and the people at drupal suggested, but I still got the same error hmm...i also tried what these people suggested http://www.bluehostforum.com/archive/in ... t-949.html which was to put the php.ini file into each of the folders with the download.php file in it.

Maybe I could just upload the file to my host and create a new record in the 'download' table in the database? But then I wouldn't have an encrypted version of the file...any ideas?

But yeah, the problem's with my host (godaddy) limiting the upload rather than some code in one of the files then? Or is there somewhere in one of the files that limits it?

Newbie

Posts

Joined
Sat Mar 07, 2009 12:18 am
Location - London, United Kingdom

Post by tv_boy123 » Tue Mar 10, 2009 1:06 am

YES!!!!!!!!!!!!!!! I got it to work!! Thank you sooooooo much :D i was clueless until you helped out! Thanks! I was looking around and cos I'm using php5 the php.ini wasn't working, so i renamed it to php5.ini and added the code you suggested. This is the code I now have in my php5.ini files:

Code: Select all

magic_quotes_gpc = off;
register_globals = off;
upload_max_filesize = 390M ;
post_max_size = 400M ;
memory_limit = 640M ;
file_uploads = On ;
magic_quotes_gpc=off;
magic_quotes_sybase=off;
I'm so happy!! I'd been puzzling over that day and night for around a week. You star ;D

Newbie

Posts

Joined
Sat Mar 07, 2009 12:18 am
Location - London, United Kingdom

Post by davykeenan » Wed Jun 24, 2009 12:27 am

Hi, I put the php5.ini file in beside the php.ini file and there was no change, how long do you need to wait?

Can you tell me where you ended up putting the php5.ini file or how you got it to work?

User avatar
Active Member

Posts

Joined
Tue Jun 16, 2009 8:01 pm

Post by readyman » Thu Jun 25, 2009 5:41 am

Hi Davy, it depends on your host if this file will work... ask your host if you are able to update those settings using the php.ini file or where they allow you to use that file. Send them that file so that they know which settings you want changed.
Although a lot of PHP installations are standard, there are still a lot of different setups.

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by Daniel » Thu Jun 25, 2009 6:04 am

i'm goign to set it so large files can be uploaded via ftp and you can just set the location in a field.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by davykeenan » Thu Jun 25, 2009 7:22 am

Thanks ReadyMan and Daniel,

Both Answers were great, I got my hosts to change the upload limit and works fine.

Daniel, the FTP idea is great but I am just wondering how you are going to deal with the security of the files?

As Tv_boy123 says a few posts ago - "Maybe I could just upload the file to my host and create a new record in the 'download' table in the database? But then I wouldn't have an encrypted version of the file...any ideas?"

I take it you would use some sort of encryption to protect the files, similar to the current upload system or would this be up to the admin??

User avatar
Active Member

Posts

Joined
Tue Jun 16, 2009 8:01 pm

Post by jeremyc » Wed Jul 15, 2009 4:12 am

Is there anyway I can upload the "downloadable" files via ftp and then set the cart tosee that file as downloadable?

Newbie

Posts

Joined
Wed Jul 15, 2009 4:10 am

Post by Daniel » Wed Jul 15, 2009 5:10 am

I might have to push the user to rename the files something wierd.

at the moment the system renames the files with a random string and sends a different name for the files when customers download.

OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by cocoholo » Wed Aug 19, 2009 11:01 am

I've contacted hostgator and they told me uploading files via php is set at 65MB.
I'm trying to upload a 12MB - didn't work out
I tried to upload a 5MB - didn't work out either.

and I got this message >> Warning: The uploaded file exceeds the upload_max_filesize directive in php.ini!

They also told me that's php.ini in the root is unusable because they've set it up globally.

>:(

anybody?

Newbie

Posts

Joined
Tue Aug 18, 2009 10:09 am

Post by paulsvang » Thu Oct 15, 2009 7:13 am

I"m having the same error. My host has it at 100mb upload limit and I can't even upload 2.6mb

I can do anything under 1mb okay but the 2.6 limit is killing me. Please help. I've tried the php.ini and php5.ini m html_public folder

no luck

Opencart Hosting Specialist


New member

Posts

Joined
Fri Aug 07, 2009 5:31 am


Post by Qphoria » Sat Nov 28, 2009 5:12 am

I have a new mod that allows AutoDetect and Insert of downloads into your OpenCart system.
Simply upload the files to your download folder, and when you edit/insert a product or goto the downloads area, all the downloads will be uploaded and inserted for you.

http://www.unbannable.com/ocstore/dl_auto_insert
No more file size issues or php memory limits

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: Bing [Bot] and 86 guests