<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Attachments limitations only work when between IMP&#039;s attach_size_limit and PHP&#039;s post_max_size</title> 
  <pubDate>Fri, 10 Apr 2026 19:28:20 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/1947</link> 
  <atom:link rel="self" type="application/rss+xml" title="Attachments limitations only work when between IMP&#039;s attach_size_limit and PHP&#039;s post_max_size" href="https://bugs.horde.org/ticket/1947/rss" /> 
  <description>Attachments limitations only work when between IMP&#039;s attach_size_limit and PHP&#039;s post_max_size</description> 
 
   
   
  <item> 
   <title>We have limited the IMP attachment size with $conf[&#039;compose&#039;</title> 
   <description>We have limited the IMP attachment size with $conf[&#039;compose&#039;][&#039;attach_size_limit&#039;], and we&#039;ve set a slightly larger size limit in php&#039;s post_max_size.  When a user attempts to attach a file that&#039;s between the two sizes, IMP produces the expected message saying that it can not attach the file because it&#039;s too big.  If the user tries to attach a file larger than post_max_size, though, php produces an error, but IMP does not detect that the attachment size is too large and warn the user.  Instead, the compose screen is wiped and returned to its virgin state.



I suspect that this happens because horde is using the superglobal arrays $_POST and $_FILES to maintain email state.  See http://www.php.net/manual/en/ini.core.php#ini.post-max-size



The only workaround from a configuration perspective is to make post_max_size ludicrously large so that a user could never attempt to attach a file that big.  Unfortunately, this means that other PHP applications can also take advantage of that size limit.



Perferably imp/horde would warn the user and keep state any time the attachment size exceeded attach_size_limit, not just when it&#039;s between attach_size_limit and post_max_size.</description> 
   <pubDate>Tue, 10 May 2005 21:32:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1947#t8094</link> 
  </item> 
   
  <item> 
   <title>Now that I&#039;ve thought about this a little more, I don&#039;t see </title> 
   <description>Now that I&#039;ve thought about this a little more, I don&#039;t see how we can really do this. Obviously we have to track *some* state in _POST - we could track the previous state in the session, but then the user would go to upload a file that&#039;s too large and they&#039;d have a weirdly reverted message window - and if they hadn&#039;t submitted it at all yet, it&#039;d just be blank like it is now.



Where would you like us to store state?</description> 
   <pubDate>Mon, 30 May 2005 04:43:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1947#t8694</link> 
  </item> 
   
  <item> 
   <title>No feedback.</title> 
   <description>No feedback.</description> 
   <pubDate>Mon, 11 Jul 2005 10:14:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1947#t9634</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
