title: Can't get PHP to allow memory size larger than 536870912 bytes. Magento Script
body: <p>I am trying to run a product export with Magento's dataflow using the CLI script found here: <a href="https://www.kerstner.at/2015/07/run-magento-data-flow-profile-from-shell/" rel="nofollow noreferrer">https://www.kerstner.at/2015/07/run-magento-data-flow-profile-from-shell/</a></p>
  
  <p>The issue I am facing is the script always stops with the following error:</p>
  
  <blockquote>
    <p>Fatal error: Allowed memory size of 536870912 bytes exhausted</p>
  </blockquote>
  
  <p>I have attempted to change the memory_limit for PHP in multiple places:</p>
  
  <ul>
  <li>Changed all php.ini files</li>
  <li>Added "<em>ini_set("memory_limit","1024M");</em>" to the code.</li>
  <li>Input "<em>php -d memory_limit=1024M</em>" at the command line.</li>
  <li>Checked the setting using the CLI command "<em>php -i | grep
  memory_limit</em>"</li>
  <li>Checked the memory_limit using <em>phpinfo()</em></li>
  </ul>
  
  <p>...and yet I cannot get the script to execute beyond 536870912 bytes.</p>
  
  <p>Is there something built into Magneto that would stop this? I am running out of ideas.</p>
  
  <p>My Environment:</p>
  
  <ul>
  <li>OS: Ubuntu Server 16.04</li>
  <li>Total/Free Memory: 8GB/6.9GB</li>
  <li>PHP 7.0</li>
  </ul>
  
  <p>PHP Settings:</p>
  
  <ul>
  <li>/etc/php/7.0/apache2/php.ini : memory_limit = 1024M</li>
  <li>/etc/php/7.0/cli/php.ini : memory_limit = 1024M</li>
  </ul>