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
Hello @MarkStevenCowan
Isn't this solutions are working for you?
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)
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
php8.1 -d allow_url_fopen=on /usr/local/bin/composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
make sure composer.phar file is in the path /usr/local/bin/composer
if you dont have composer.phar then - go here and download - https://getcomposer.org/download/