Fix Curl Stuck | PHP

I your terminal is stuck on downloading when you send this command, here is the solution:

command:

curl -sS https://getcomposer.org/installer | php

Message:

All settings correct for using Composer
Downloading...

FIX: To fix this, open the cd /etc/php/7.4/apache2 file and set

cgi.fix_pathinfo=0

Stop web server

systemctl stop apache2

Try again with sudo

curl -sS https://getcomposer.org/installer | sudo php

OUTPUT:

All settings correct for using Composer
Downloading...

Composer (version 2.0.9) successfully installed to: /etc/php/7.4/composer.phar
Use it: php composer.phar

Another error I received was: the installation directory" /etc/php/7.4/apache2 "is not writable

You can try this command to change the permissions and see if it works:

sudo chmod 755 /etc/php/ -R

You can follow this guy's tutorial on exactly how to do it

QU43xeaAtSY