I registered Bluehost, because they are recommended by drupal and because I wanted shell access for drush. I tried to install drush, but got some problems. Bluehostforum.com doesn't seem to be online anymore, that's why I'm asking here.
First I had to contact the support to enable the shell access and they did it. Composer was already installed. Then I tried
composer require drush/drush
and got this error message:
[Composer\Downloader\TransportException] 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)
The used php.ini was somewhere in /opt/cpanel/... and read only. I set PHPRC to use the php.ini in my home directory:
php -i | grep php.ini export PHPRC=/home/mydir/php.ini
Now there were extensions missing ('undefined function ...') which I added in php.ini:
allow_url_fopen = On extension = phar.so extension = json.so extension = tokenizer.so extension = ctype.so extension = iconv.so extension = simplexml.so
Finally drush was working. Is there a better way to do this? I.e. to add all the extensions in one step?
Thank you very much!