cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR INSTALLING MAGENTO 2.4.0 SSH

ERROR INSTALLING MAGENTO 2.4.0 SSH

i am trying to install magento 2.4.0 via ssh into my server, i am using composer i mean i have downloaded the composer.phar file and drop it into the folder.... then i tried to install my magento but appears this error:

 

[Composer\Downloader\TransportException]                                                                                                                                                              
  The "https://repo.magento.com/packages.json" file could not be downloaded: allow_url_fopen must be enabled in php.ini (https:// wrapper is disabled in the server configuration by allow_url_fopen=0  
  failed to open stream: no suitable wrapper could be found)

 

i have already enabled the  "allow_url_fopen" in the php.ini but error still appearing

 

could you please help me?

 

thanks!

2 REPLIES 2

Re: ERROR INSTALLING MAGENTO 2.4.0 SSH

Hi @cesarupb ,

 

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

By calling the php binary with the -dallow_url_fopen=on parameter, you’re overwriting the php.ini for that invocation of composer. So you can bypass the php.ini settings altogether.

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: ERROR INSTALLING MAGENTO 2.4.0 SSH

@cesarupb 

 

Make sure you restart your server after changing in php.ini and Magento 2.4 works well with PHP 7.3.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy