cancel
Showing results for 
Search instead for 
Did you mean: 

https://repo.magento.com/packages.json" file could not be downloaded: allow_url_fopen must be enable

Highlighted

https://repo.magento.com/packages.json" file could not be downloaded: allow_url_fopen must be enable

I'm installing fresh using command line and when I get to the step:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public_html

 

I get the following error msg:


[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)

 

The issue here is I do have allow_url_fopen On, and have double-checked it using a phpinfo.php file

 

I'm stuck, any one else run into this issue and found success?

 

By the way, I'm on a VPS and have full access to WHM cPanel and all settings

3 REPLIES 3
Highlighted

Re: https://repo.magento.com/packages.json" file could not be downloaded: allow_url_fopen must

Hello @MarkStevenCowan 

Isn't this solutions are working for you?

https://community.magento.com/t5/Magento-2-x-Technical-Issues/allow-url-fopen-ENABLED-but-composer-r...

Found something useful, "Kudos" and "Accept as Solution" for Token of Appreciation.

Magento Tutorials

Re: https://repo.magento.com/packages.json" file could not be downloaded: allow_url_fopen must

No that wont wor either.

 

Further info:

I checked using:

[orgorg@server public_html]$ php -i | grep allow_url_fopen
allow_url_fopen => On => On

 

So it's on but still getting:


[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)

 

Highlighted

Re: https://repo.magento.com/packages.json" file could not be downloaded: allow_url_fopen must

Hello @MarkStevenCowan 

 

Please follow below steps to fix your issue

 

1. Please run command like

php composer.phar -dallow_url_fopen=1 create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public_html

 

You can download composer.phar file from here https://getcomposer.org/download/

if you have full path of composer than please run command like

php <full path of composer>

-dallow_url_fopen=1 create-project --repository-url=https://repo.magento.com/ magento/project-community-edition public_html

<full path of composer> = should be /opt/cpanel/composer/bin/composer 

 

2. you should enable allow_url_fopen from php.ini file of server

 

3. you can enable allow_url_fopen from cpanel https://chemicloud.com/kb/article/how-to-enable-or-disable-allow_url_fopen-in-cpanel/

 

Let me know if you still facing any issue

 

If my answer is useful, please Accept as Solution & give Kudos

 

Thank you

Aims Infosoft