RockNRollPig Posted February 8, 2004 Share Posted February 8, 2004 I have a site where bands can have their own little pages on the website. I'd like to let them upload mp3's and video. As of now they are just e-mailing them to me. I know PHP has a default max upload size of like 2mb. Where would i change this? I have a dedicated server so I can mess with all the settings. I'm also aware that most browser tend to time-out after the files get to big. So...any suggestions on the best way to go about this would be stellar. Thanks! Quote Link to comment Share on other sites More sharing options...
MikeJ Posted February 8, 2004 Share Posted February 8, 2004 You could give them all FTP accounts, that would probably be the best way to transfer large files. And since you will have web pages for the bands, it probably wouldn't be much more work to also create an FTP account when you setup their webpages (or automate that). Quote Link to comment Share on other sites More sharing options...
RockNRollPig Posted February 9, 2004 Author Share Posted February 9, 2004 Giving hundreds upon hundreds of bands FTP accounts I don't think is very practical. What about sites like mp3.com (when it was running) that would let people upload mp3's? I remember doing that and it was just a simple form. Quote Link to comment Share on other sites More sharing options...
MikeJ Posted February 9, 2004 Share Posted February 9, 2004 Sorry... didn't realize you were talking about hundreds or more. Anyway, if you want to change the php setting, edit your /usr/local/lib/php.ini file and change the following line appropriately: >upload_max_filesize = 2M ; Maximum allowed size for uploaded files Then restart apache and make sure to test with multiple browsers to make sure the larger size is reliable. Quote Link to comment Share on other sites More sharing options...
DarqFlare Posted February 9, 2004 Share Posted February 9, 2004 Reminder: you cannot partake in illegal activities with your TCH accounts. If you are dealing with MP3s, make sure they are all legal in what you are doing with them. You are responsible for what your users do with your website, so if they do something illegal, it all comes back to you. That being said... I think the INI setting is where you want to go. I think there's a function in PHP that you can use to set the INI without having to open the INI in an editor, but I'm not sure what it is. Quote Link to comment Share on other sites More sharing options...
RockNRollPig Posted February 9, 2004 Author Share Posted February 9, 2004 Hi Robert. Yes, I'm fully aware of the situation as far as legality goes. All of these bands register for a section on the site and then upload thier MP3's...much like MP3.com was. Anywho...speaking of the php.ini...how do i get to it? Quote Link to comment Share on other sites More sharing options...
MikeJ Posted February 9, 2004 Share Posted February 9, 2004 Since you are on a dedicated server, you can SSH into it and modify the file. I'm not aware of a way to modify that file via CPanel/WHM. Quote Link to comment Share on other sites More sharing options...
MikeJ Posted February 9, 2004 Share Posted February 9, 2004 (edited) Looks like you can also try using the ini_set function of PHP. This would allow you to set a max per PHP script (so you could have different values for different upload scripts). Or... supposedly it's also possible to set it in .htaccess if you put something like the following in there: ># upload_max_filesize php_value upload_max_filesize 4M Edited February 9, 2004 by Big Gorilla Quote Link to comment Share on other sites More sharing options...
DarqFlare Posted February 10, 2004 Share Posted February 10, 2004 Aha, Gorilla had the function, nice job. Quote Link to comment Share on other sites More sharing options...
MikeJ Posted February 10, 2004 Share Posted February 10, 2004 Aha, Gorilla had the function, nice job. Actually, Gorilla just had Google and a affinity for magic banana's . PHP.net had the function. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.