We ran into an issue today trying to run composer update. The following error message was displayed:
The "https://packagist.org/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)
TO fix this we completed the following steps:
1.) Opening WHM > MultiPHP INI Editor
2.) Select the version of PHP that is active for our specific account (you can look at MultiPHP manager to find your active version of PHP for each account)
3.) Find allow_url_fopen and set it to enabled.
4.) Run composer update again, once it completes turn allow_url_fopen back to disabled as its a security risk to leave this enabled long term.
- Updating Composer To Use New Version Of PHP
- CLass PDO Not Found Laravel 5.6