Max upload file size
Is it possible to change the max file size setting without changing PHP.INI?
SiteGround is hosting my website and I can't change any settings in the php.ini file.
Alas I need to be able to change the max file upload size to a value bigger than 2 Mbyte.
Can I do this by hard coding something into one of the YACS files?
Thanks in advance.
Jan
Thanks in advance.
Jan
Lucrecius![]() from La Rochelle / Charente-Maritime / France 244 posts | Hi ! That kind of parameter should stay outside Yacs... I do undertand your need...'cause I'm actually building sites aiming file sharing (images, sound... and video sequences), for educational purpose. Fortunatly, I manage my own server, and can change most of environnement/system parameters. For your purpose, could you split files into smaller chunks (less than 2MB) ?... and upload them that way. About Yacs "HardCoding", I let Bernard answer. Berhaps, should you consider a special module doing this kind of split/unsplit process ? Yacsly yours, Lucrecius |
| Bernard from nearby-an-airport Associate, 6796 posts | Hello Jan, According to PHP techical documentation, some parameters of the PHP.INI file may be changed from within a script, by calling function ini_set(), including the infamous parameter upload_max_filesize, which explains the default limit to 2M.However, this change would be inoperant, because your script would be called after the upload, meaning call to ini_set() would be too late anyway.If PHP.INI is out of reach, maybe could you consider to upload a customized .htaccess file to have Apache override some PHP options. Of course, this requires your ISP to have put either AllowOverride Options or AllowOverride All privileges in httpd.conf. If this is feasible, or if you want to try the solution on your own, create or edit a file named .htaccess in YACS installation directory with following directives (assuming you want a 6Mb max attachment size):php_value post_max_size "7M" As a summary of possible options : 1. change to PHP.INI is recommended2. add some .htaccess as explained above3. upload separately, for example with FTP, and put full URL of files in YACS 4. kindly obtain more upload resources from your ISP, or switch to another ISP... |
| Bernard from nearby-an-airport Associate, 6796 posts | Also, I have added a FAQ page on this topic at How to overcome upload limitations? |
| ATorres617 9 posts | I had Site Ground/my host change the max upload to 5 MB for the YACS folder in my directory. The support person said he had changed the max upload size to 5 MB for the folder YACS/images. Now I cannot upload any images? Does anyone have any advice on this? Thanks, A. Torres |
| Bernard from nearby-an-airport Associate, 6796 posts |
ATorres617: Could you upload images prior the change? if not, this could be related to some permissions issue? |
| ATorres617 9 posts |
I was able to upload images prior to the change. I uploaded about 25 pictures before that. I asked the support person at Site Ground to look into this as I cannot even upload a picture that's smaller than 2 MB now. I'll let you know if they resolve it. Thanks, Arturo |
| ATorres617 9 posts |
This is what the support staff wrote to me: I'm going to re-install it. Thanks, Arturo |
| ATorres617 9 posts |
They wrote: Well this is very strange indeed. All limitations on the server are set to much higher values than the files that you are trying to upload. You should be able to upload pictures to your CMS. I am afraid that we are unable to determine what is causing the error message. If you do not have any valuable information on it yet, you can try re-installing it. |
JBN![]() 85 posts | This was fixed by SiteGround and the max upload limit is 10Mbyte. It worked once I restarted the YACS server. The only thing SiteGround did was add a special php.ini file in my www folder. Best regards Jan |
| Bernard from nearby-an-airport Associate, 6796 posts |
JBN: Thank you for the positive feed-back. I didn't know it was possible to add one php.ini per virtual server... |
| ATorres617 9 posts |
Jan, Would you mind e-mailing me a copy of the ini file? I also have Site Ground. They supposedly set the settings correctly but I was sitll unable to upload photos 2 MBs or larger through YACS - I had to follow one of Bernards other suggestions to FTP the regular way and the link to the file. Thanks - My e-mail is ATorres617@yahoo.com. Arturo |
Rate this page
Posted by JBN on Feb. 18 2006, commented by ATorres617 on Feb. 18 2006, (popular)

