Jump to content
xisto Community
ruben1405241511

Php.ini Limits Upload_max_filesize and thereby destroys all my hopes

Recommended Posts

Hej!As you all probably know, there is a file upload size limit, when uploading with PHP. It is the default preference in the php.ini (file that configures PHP) and cannot be changed by users.Currently it is set to the very low value of 2M. I think this is pretty low in an internet where quality gets better everyday and file size under 10MB are considered really small (yes, not occuring to web pages, but to a lot of other things).I am trying to make a small upload script for myself and my school newspaper, so that I can quickly load up changes from a computer, when I don't have FTP access or not the time to configure everything. I think this does not interfere with the hosting rules. I know this is not a file shack, but since we all have dedicated space and bandwidth, it won't disturb anyone, if we use it to its extents.I work for example with a school newspaper and we want to exchange PDF-files when they are finish, to criticise them and publish them later for those, who didn't have the opportunity to buy them. But I don't want to give the PDF-guy a password for FTP, so I would like to give him a web uploader. Sadly a layout PDF is normally about 30-100MB big, so I can't make a use of a PHP script. I think 2M is not a really fair limit. I thought the 5GB bandwidth we get per month was dedicated anyway. So if we use it, because we have some spare, then it won't harm the service or did I misunderstand something there?You have your reasons for that limit, but then I demand an explanation because my reasoning seems right to me (of course, hehe).regards, ruben

Share this post


Link to post
Share on other sites

well, 2MB is the default, if the limit won't be made bigger you can use an cgi/perl script which does not have such a small limit through forms, but also if written bad there might be connection problems and not all the file will be uploaded and stuff, keep alive and stuff, you can find one of those on google/hotscripts, i didn't use them for two years though, web forms weren't designed to upload big binary files :)

Share this post


Link to post
Share on other sites

So there is no limit for Perl? I have no idea how to write perl though and I don't want to use a much-too-complicated hotscript.I know it is not the best way, but sometimes I just need a fast & easy way to do stuff like this.

Share this post


Link to post
Share on other sites

I had a problem of the same kind once. I can't ftp to my site as I'm behind my campus firewall. I can only use net2ftp or some other php utility to upload. I mean, 2mb is just ridiculous .... can't this be increased to atleast 10mb? Nowadays, almost all email providers provide atleast 10mb attachment size. Can't the php.ini file be edited to take care of this?

Share this post


Link to post
Share on other sites

But guys, why do you need to upload so much with PHP. I think there're few things to do with PHP script. We can use ftp to upload file, there's no limitation on that. If you need to upload really big files. You may host them elsewhere, like filefront.com . I think those free file hosting services is good enough for you. The space at Xisto should be used wisely for your website only.

Share this post


Link to post
Share on other sites

But guys, why do you need to upload so much with PHP. I think there're few things to do with PHP script. We can use ftp to upload file, there's no limitation on that. If you need to upload really big files. You may host them elsewhere, like filefront.com . I think those free file hosting services is good enough for you. The space at Xisto should be used wisely for your website only.

I can't use ftp from behind my campus firewall. Actually, I was trying to upload net2ftp which is an ftp manager using php, and I had to upload it bit by bit. Also, what if I need to restore a backup of my entire website. The size of the backup is around 25 mb. About hosting files, these are files related to our website ... we are not uploading mp3s and videos. I have some images for my gallery which are bigger than 2mb and can't upload them as they are.

Share this post


Link to post
Share on other sites

and mp3s and or videos don't have to be illegal necessarily. i had big pdf-files, that I needed uploaded, but I didn't want to give the guy FTP-access.A web upload is a very convenient thing, you can't deny that. You don't have FTP access all the time from every place. Services like filefront or rapidshare are clustered with ads, difficult to use and way too slow..

Share this post


Link to post
Share on other sites

FINALLY .. lol , my recent problem with the CMS i was using was exactly the same, only 2MB upload by default. I guess my question was answered then to change the PHP files, but the main settings lie in php.ini .. If the mods could consider requests of some users, then i would be really glad.2MB is kinda less for a webupload now, atleast max 10 or 15 MB would be helpful if it doesnt harm the rest of the users.RegardsDhanesh.

Share this post


Link to post
Share on other sites

to add what i said above you can use cgi/perl+php at one page, if you know php, perl is very easy to understand and include in your page the thing you want and there are many file uploaders written in this language.I don't know if there is no limit in perl, but it is much more than 2mb, unless the configuration here is different, as i said, i haven't done this for 2 years now..the bigger the limit is the more apache needs to work when uploading, but of course if only couple of users will be uploading, noone will notice it, so i think that is why the limit is only 2mb.

Share this post


Link to post
Share on other sites

Yo,I have tried to implement a simple script from hotscripts now (Perl/CGI) but it didn't work, I got an internal server error when just trying to call the script.What do I have to think of when using cgi on Xisto? All the scripts have to go in cgi-bin/ right? Then I can just link to them from my forms in the action-attribute and hope that it works.? Well it doesn't.Do I have to enable perl-support in the Cpanel or something (searched, but didnt find it)?Or is there a special way of implementing the modules? I can post my source codes if it helps, I'm still trying to understand it :-)I don't have it here right, now but I can come up with it later.Thanks a lot for help,Ruben

Share this post


Link to post
Share on other sites

you can place them in your site and make the extension .shtml, I didn't write perl for a long time (as a matter of fact I never wrote my perl script just edited them), but I did it like that and used an include function to later include my php file (which the serber executed), the upload script worked and it included from the perl my php script which parsed my site :) as I remember I had problems with paths and permissions, maybe this tips might help you, to write the right paths and the scripts in cgi-bin should be executable and stuff ;) Yes, I wasn't much of help ? but I don't know what you have there.

Share this post


Link to post
Share on other sites

Hi,it works for me now, thank you. But when I tried to upload a 2MB+ file for testing purposes I was stuck in the loading process forever.. ISP problem or is there a low limit for Perl too? I don't know if there is a cgi.ini so I was wondering where to find out this limit. Thanks for your help, Quatrux!Ruben

Share this post


Link to post
Share on other sites

Well, if you want to do it with php, you could use an .htaccess file, but not all servers lets to do this, try putting a .httaccess file in your public_html directroy with this code.

# Change Upload Max Filesizephp_value upload_max_filesize 8M

also you can use it to change php/apache configuration, like I always turn this off for better programming.

php_flag register_globals offphp_flag magic_quotes_gpc offphp_flag magic_quotes_runtime off

Try and tell me the results if php will let you upload more than 2mb I never tryed it. :huh:

Share this post


Link to post
Share on other sites

Oh nice to know, that this is possible, I always thought we couldn't change the php.ini. You should make a nice tutorial some time! This is the thing that I was searching for, thanks a lot.Are register_globals on on Xisto? I never tried cos I do it the "right" way anyway, but I thought they were off..You just opened a door for me, thanks!

Share this post


Link to post
Share on other sites

no problems, always happy to help if I can.. yeah, register globals is on on Xisto and that is quite unsave.. hmm maybe I could write some tutorial, need to try. :huh:

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.