title: Apache2 - Changing the php memory limit for specific urls
body: <p>I was wondering if it's possible to change the php_value memory_limit for a specific url.</p>
  
  <p>I've tried using <code>ini_set('memory_limit', '256M')</code>, as well as setting the <code>suhosin memory.limit</code> to 256M, but it just doesn't work, whenever I do <code>var_dump(ini_set('memory_limit', 256M))</code>i just get <code>bool(false)</code>.</p>
  
  <p>I was wondering if there is a way of changing httpd.include to change the php memory limit for a specific url. At the moment i have this:</p>
  
  <pre><code>&lt;LocationMatch "docs/download/"&gt;
          php_value memory_limit "256M"
  &lt;/LocationMatch&gt;
  </code></pre>
  
  <p>so if I navigate to docs/download/ in the url I want it to up the memory limit, but doing <code>ini_get('memory_limit')</code> still only returns the memory_limit that's set in .htaccess which is 128M.</p>
  
  <p>Okay, so I've actually solved this. It was an issue with Suhosin. I had changed the file in <code>/etc/php5/conf.d</code> but there was another Suhosin file in <code>/etc/php5/apache2/conf.d</code> that I failed to change. Doing this fixed the issue. </p>