× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Run php cli command with custom php.ini configuration.

Sep 07, 2015
<p>I was working with Jan, one of the most amazing and promising mentees here on codementor, on one of his apps which is hosted on mediatemple.  We setup <em><strong>git push</strong></em> to deploy feature for the app but <em><strong>composer install</strong></em> was failing on the server, complaining that <em><strong>allow_url_fopen</strong></em><span style="color:rgb(95, 99, 102)"> is not enabled. We then modified the php.ini config for the domain but that still didn't change the config for the <strong><em>cli php.</em></strong></span></p> <p><span style="color:rgb(95, 99, 102)">Finally, we resorted to the manual and used the <strong><em>-d</em></strong> option </span><a href="http://php.net/manual/en/features.commandline.options.php">http://php.net/manual/en/features.commandline.options.php</a> to enable<span style="color:rgb(95, 99, 102)"> </span><em><strong>allow_url_fopen</strong></em><span style="color:rgb(95, 99, 102)"> . Example command - </span></p> <pre><code class="language-bash">php -d allow_url_fopen=1 composer.phar install</code></pre> <p> </p>
comments powered by Disqus