Discussion Forums  >  Self Hosted Control Panels

Replies: 5    Views: 57

GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
09/03/12 12:57 AM (13 years ago)

error on uploading movie (invalid request)

Well the title almost explains it all. I try to upload a mp4 movie file (BT server 2.0) to the Video section of 'files'. The upload seems to go well for a while (the wheel is turning) but then a blanc screen with only 'invalid request' in the left upper corner appears. The file size is 34 Mb, there's no file limitation on my web server cause i uploaded much bigger files with ftp. Other and smaller files are no problem. HELP!!!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/03/12 01:08 AM (13 years ago)
Hmm... self hosted I'll assume because BT.com panels don't allow media uploads. PHP can be a real bear when it comes to handling even slightly large uploads. There are countless ways to configure these backends so it's super hard to know exactly what's happening. 99 / 100 times largish file uploads that fails are caused by limitation imposed by a hosting provider. The limitation imposed via FTP (assuming hosting account here) has zero to do with this. PHP uses a different process than FTP and it's common for hosts to allow large uploads via FTP. This makes sense. The usual reason they won't allow large uploads via PHP is that the webserver (apache) is 100% tied up while it waits and waits for the upload to finish. Imagine how bogus is would be if a user on a shared host consumed the entire apache process while somebody uploaded a file for :20 minutes. No webpages would be returned, for anyone, for :20 minutes. Understanding this helps understand why they may be imposing limits. a) If you're on a hosting account somewhere, ask them (search their FAQ's, forums) what the max upload size is for PHP. b) If you're NOT on a hosting account (dedicated server, etc), there are some tricky things you can do to allow larger uploads but beware, none of them are easy. Another idea, and this can get tricky too but may be worth the effort? 1) Upload the file using FTP to the applications directory. Look at the directory for the app, you'll see sub directories for images, documents, etc. All app directories on in /files/applications/[app id] 2) Upload that baby via FTP. This will get it on the file system but will NOT get it on the list of files in your File Manager in the bt control panel. The files in that list are database records. When you upload a file using the File Manager a new record is created in the database in bt_files table. THis means you can easily open your mySQL manager (probably phpAdmin) and create a new row in bt_files for the files you used FTP to send. Hope this makes sense. Adding a "read files from directory" option in the File Manager is on our list. This would allow you to use FTP to upload large files then click the option to update the database.
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
09/03/12 01:43 AM (13 years ago)
David, thanks very much for the quick reply. Your answer really make sense, i'll try the trick with FTP and edit the database record manually. Thanks very much!! Gert-Jan
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
09/03/12 04:48 AM (13 years ago)
I started this really long post about using the php_info function and then remembered it's already in your self hosted panel!!! Log on and choose the admin menu, look for "Show PHP Info" under the admin options on the left. You'll see a whole lot of information ... search for max_file_uploads this is the size of the largest file able to be uploaded. It could also have to do with your script times "max_execution_time" or your "memory_limit", so check those out as well.
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
09/03/12 05:11 AM (13 years ago)
Thanks ictguy I'll check it out!
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
09/03/12 05:17 AM (13 years ago)
.....and yes....20Mb is the max....so problem became a 'known error' ...... The database trick will help me on this one. Thanx guys....case closed!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.