Roundcube Community Forum
News and Announcements => General Discussion => Topic started by: bobg on February 19, 2010, 05:02:04 AM
-
I appreciate this issue has been discussed in the past, but I need help with php.ini, etc, to increase attachment size to, say, 10Mb.
I am a reseller, installing RoundCube for the first time into a public_html/webmail folder at each of my hosted domains. I can see several .htaccess files, but I can't see a php.ini. I've created a new php.ini containing:
[PHP]
; Increase maximum post size
post_max_size = 25M
; Increase maximum upload size
upload_max_filesize = 25M
and dropped it into several locations, but everytime I try to send an attachment RoundCube still says my limit is 2.0Mb. My hosting company say it's a simply question of creating a php.ini file (I'm apparantly using php4), but no joy. I don't have access to folders such as apache/etc and so on.
Can anyone provide me with simple steps here. Thank you, Bob.
-
No need to create a php.ini.
Just edit the .htaccess file.
-
Many thanks, Bagu
My .htaccess file contains the following lines:
php_value upload_max_filesize 5M
php_value post_max_size 6M
php_value memory_limit 64M
What values would you suggest for 10Mb uploads, please. Also, if the values above are currently 5M and 6M, are you able to explain please the message that appears in RoundCube when I go to add an attachment is: "Maximum allowed file size is 2.0MB". Also, when I just tried to add a 3.7Mb attachment, the file was not attached, and the message was sent without it.
Any help would be appreciated. Many thanks, Bob.
-
Here are my value :
php_value upload_max_filesize 16M
php_value post_max_size 16M
php_value memory_limit 128M
But, if you are reseller, it's possible that you can't change settings set in php.ini of your host.
-
Hi Bagu
Thanks for the reply. Yes, It does look like I need to amend or add a php.ini file somewhere. My hosting company say that all I need to do, if there isn't one, is to create one, and it would override their server settings. I do wonder if they have got that wrong, though. I have tried creating what looks like a proper php.ini file, using parameters found elsewhere on this forum, and have dropped the file into several RC folders, but this doesn't change the message about the 2.0MB limit. Thanking you in anticipation, Bob.
-
Here is my php.ini settings for roundcube:
post_max_size = 16M
upload_max_filesize = 16M
max_input_time = 180
memory_limit = 128M
max_execution_time = 180
-
Bagu, you've been great - thank you. Hopefully, one last question. Where have you placed the php.ini file. On each of my hosting accounts, I have created a folder called 'webmail', as a sub-folder of the root for the hosting, called public_html (pretty standard, I think) - public_html/webmail. Within the webmail folder are the 9 RoundSube sub-folders: bin, config, logs, plugins, program, skins, SQL, temp and _files. Is this the same for you? If so, where should I place php.ini - in one of the sub-folders? In the webmail folder itself, perhaps? I appreciate your help, thank you. Bob
-
It should be placed in RoundCube's root folder.
-
I've finally solved the problem, and I can now attach files greater than a total limit of 2.0Mb. The solution was to rename the file php.ini to php5.ini (and place it in the root folder of RoundCube, along with .htaccess). By default, my hosting company supplies PHP version 4 (with the option of changing to version 5). I had learnt that for version 4, the file should be called php.ini, whilst if using PHP version 5, then the file should be called php5.ini. Naturally, I called the file php.ini as my hosting company was providing PHP version 4 by default. I then spotted the statement at the top of .htaccess: SetEnv DEFAULT_PHP_VERSION 5, which apparantly forces PHP to work as version 5. Putting 2 and 2 together, I then renamed php.ini to php5.ini, and I can now send files up to 16Mb in (total) size - using the following statements:
The .htaccess file:
php_value upload_max_filesize 16M
php_value post_max_size 16M
php_value memory_limit 128M
The php5.ini file (containing no more than the following lines):
post_max_size = 16M
upload_max_filesize = 16M
max_input_time = 180
memory_limit = 128M
max_execution_time = 180
Many thanks to all, Bob.
-
I don't understand how you can have a php.ini in your roundcube folder. php.ini is in /etc, isn't it ?
-
Some servers use a php.ini file to override setting instead of a .htaccess
-
I solved this problem, because in my case the above solution does not work. You have change one more file the settings in the /etc/roundcube/htaccess. For more information, visit http://maciej.pawlikowice.info/artykuly/36-linux/82-roundcube-zmiana-rozmiaru-maksymalnego-wysylanych-zalacznikow
-
I spent the last 30 min or so struggling with this issue before finally figuring it out. Since I did not find this documented anywhere yet I'll post it here, hopefully reducing someone else's suffering... I'm migrating our Roundcube to a RHEL6-based server (from openSUSE), on which newer versions of some packages were installed from a rhscl distribution channel (the default RHEL6 php is v5.3 I think). This 'offical RH hack' installs this non-standard stuff under /opt/rh/, in this case /opt/rh/php55/root/, so changing the standard /etc/php.ini does not do anything, php5.5 uses /opt/rh/php55/root/etc/php.ini instead... :-\ (Like my apache 2.4 stuff is under /opt/rh/httpd24/root/, etc.)