I need to set the php setting "allow_url_fopen" to "On".
I intend to install Drupal using Composer and the php setting "allow_url_fopen" needs to be set to "On". The system default seems to be set to "Off". I have a local php.ini file, that was created through cPanel, in my home directory with the "allow_url_fopen" set to "On". However Composer won't run and complains about the incorrect setting. If from my directory I execute the command ">php -i | grep allow_url_fopen" I see the output as "allow_url_fopen => Off => Off".
Why is then when I run php from my home directory the settings in the local php.ini file aren't being respected?
Hi John-Paul,
Thanks for the reply. I wasn't able to get the php to abide by the local php.ini file however I was able to circumvent the issue buy using "php -d allow_url_fopen=on" before the composer command. Such as:
So problem solved for now. Thanks.
Hi Charles,
Thanks for updating us on the solution you have found. Just as an FYI, depending on your account type, a change to the server-wide php.ini file wouldn't be possible without root level access. If you're on a shared server (business-level account), then you wouldn't be able to make a change to that php.ini file. However, on a VPS or Dedicated server, you can make changes with root-level access.
We do appreciate you letting us know how you made it work! These answers are public domain and may help someone with the same issue! Thanks again!
Kindest regards,
Arnel C.