phpxmlrpc
phpxmlrpc copied to clipboard
curl error 28 while downloading https://repo.packagist.org/p2/vendor/package.json
Following the instructions on https://github.com/gggeek/phpxmlrpc/blob/master/INSTALL.md
$ composer require phpxmlrpc/phpxmlrpc:4
I get
https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Failed to connect to repo.packagist.org port 443: Connection timed out), package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
curl error 28 while downloading https://repo.packagist.org/p2/vendor/package.json: Failed to connect to repo.packagist.org port 443: Connection timed out
probaly due to a failure I made.
That looks like a network error condition, possibly a transient one. In any case it is not related to this library, but to Composer, which is a 3rd party tool.
Can you check if you are using composer v1 or v2 by running composer --version
?
Also, running composer diagnose
might help...
Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking github.com rate limit: OK Checking disk free space: OK Composer version: 2.0.9 PHP version: 7.4.21 PHP binary path: /usr/bin/php7.4 OpenSSL version: OpenSSL 1.1.1k 25 Mar 2021 cURL version: 7.74.0 libz 1.2.11 ssl OpenSSL/1.1.1k zip: extension present, unzip present
check out https://repo.packagist.org/p2/vendor/package.json do you get a 404 ? prolly the right link should be https://repo.packagist.org/packages.json
I do get a 404 for https://repo.packagist.org/p2/vendor/package.json.
Otoh when I run the very same command composer require phpxmlrpc/phpxmlrpc:4
locally, it works - with composer 2.1.5 using curl 7.68.0.
PS: I asked the lead dev of Composer, and he said that the problem is in the curl timeout, not in the fact that composer tries to access that page. Is there a reverse proxy in place?
See also this ticket: https://github.com/composer/composer/issues/10161 - it seems that the upcoming Composer 2.2 will be more prone to retry failed connections to Packagist
1 year and no feedback - closing
please check if you have "mod_security" or "mod_security2" enabled in your apache2 If you have access to the settings they are usually in /etc/modsecurity you can go like this :
mcedit /etc/modsecurity/crs/packagist.conf
SecRule SERVER_NAME "composer.org" \
"id:1000,phase:1,t:none,nolog,allow,ctl:ruleEngine=Off"
SecRule SERVER_NAME "packagist.org" \
"id:1001,phase:1,t:none,nolog,allow,ctl:ruleEngine=Off"
SecRule REMOTE_ADDR "@ipMatch 185.85.2.0/22" \
"id:1002,phase:1,t:none,nolog,allow,ctl:ruleEngine=Off"
SecRule REMOTE_ADDR "@ipMatch 146.59.12.128/25" \
"id:1003,phase:1,t:none,nolog,allow,ctl:ruleEngine=Off"
then
service apache2 restart
and have fun