Jan.31

Composer update with out allowing in php.ini [allow_url_fopen must be enabled]

Problem:

PHP Composer installation fails: file could not be downloaded: allow_url_fopen must be enabled…

 

in case we have antoher option to update the composer with out allowing url_fopnen globally to our cpanel.

 

 

If you have composer installed (the package manager for PHP), you can get the following ‘error’ message when you try to run a composer install.

$ composer install

The easiest fix is just to set the allow_url_fopen option to On in php.ini. But that enables it server-wide, you may not want that.

Here's a simple workaround, by setting the option when calling the composer binary.

 

$ which composer
/usr/local/bin/composer

$ php -d allow_url_fopen=on /usr/local/bin/composer install


Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment

Facebook Comment