1

I have downloaded .zip for zendskeleton and it is having composer.phar and composer.json. when I run below given command in Git CLI from zendskeleton folder it gives some error.

php composer.phar self-update

Error:

$ php composer.phar self-update

[Composer\Downloader\TransportException] The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection fai led because connected host has failed to respond.

self-update

php composer.phar install

Error:

$ php composer.phar install Warning: This development build of composer is over 30 days old. It is recommend ed to update it by running "composer.phar self-update" to get the latest version . Loading composer repositories with package information

[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: fai led to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-c ustom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--opt imize-autoloader]

Edit: with php composer.phar update

$ php composer.phar update Warning: This development build of composer is over 30 days old. It is recommend ed to update it by running "composer.phar self-update" to get the latest version . Loading composer repositories with package information

[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: fai led to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [ -o|--optimize-autoloader] [packages1] ... [packagesN]

Poonam Bhatt
  • 10,154
  • 16
  • 53
  • 72
  • have you tried `php composer.phar update` ? – Paulraj Oct 15 '13 at 09:28
  • what will happen with this command? – Poonam Bhatt Oct 15 '13 at 09:30
  • This will update the dependencies to latest version. – Paulraj Oct 15 '13 at 09:32
  • not working...see i have updated my quest with it as well – Poonam Bhatt Oct 15 '13 at 09:33
  • try expanding the process timeout of your composer json by adding this, `"config":{ "process-timeout":4000}`. or try by exceeding the `default_socket_timeout` time of php.ini file. may be its a host issue. – Paulraj Oct 15 '13 at 09:41
  • I have added config in json and default_socket_timeout = 60 but still same issue – Poonam Bhatt Oct 15 '13 at 09:47
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/39261/discussion-between-paulraj-and-poonam-bhatt) – Paulraj Oct 15 '13 at 09:56
  • not having access to chat page ... not possible for me – Poonam Bhatt Oct 15 '13 at 10:43
  • this error may happen due to network errors. Check if the proxy or firewall settings are okay, and use ping to detect where the connection is blocked. – Paulraj Oct 15 '13 at 10:45
  • how can i check proxy and firewall settigns – Poonam Bhatt Oct 15 '13 at 10:54
  • i have ping the blocked ...it giving replay – Poonam Bhatt Oct 15 '13 at 10:54
  • can you run `php composer.phar diagnose` and see the output for the problem ? – Paulraj Oct 15 '13 at 11:01
  • yes...I did that as well – Poonam Bhatt Oct 15 '13 at 11:09
  • Warning: This development build of composer is over 30 days old. It is recommend ed to update it by running "composer.phar self-update" to get the latest version . Checking platform settings: OK Checking http connectivity: FAIL [Composer\Downloader\TransportException] The "https://packagist.org/packages.jso n" file could not be downloaded: failed to open stream: A connection attempt fai led because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. – Poonam Bhatt Oct 15 '13 at 11:11
  • Checking composer.json: OK Checking disk free space: OK Checking composer version: [Composer\Downloader\TransportException] The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection fai led because connected host has failed to respond. – Poonam Bhatt Oct 15 '13 at 11:13
  • enable the SSL extension if not in php.ini file. `extension=php_openssl.dll` and restart the server. – Paulraj Oct 15 '13 at 11:35
  • it is alreday enable and showing in php info – Poonam Bhatt Oct 15 '13 at 17:43
  • the problem is with your proxy settings then. check this page to change your proxy and try with that. (http://stackoverflow.com/questions/15268093/composer-cannot-download-files) – Paulraj Oct 16 '13 at 07:14
  • 1
    FYI, to configure composer behind http proxy, (http://getcomposer.org/doc/03-cli.md#http-proxy-or-http-proxy) – Paulraj Oct 16 '13 at 07:17
  • add answer to this question so that I can accept it – Poonam Bhatt Oct 16 '13 at 10:18

1 Answers1

1

The error occurred due to the proxy settings. You need to set the http_proxy environment variables since you are on windows OS. You can set the environment variables as below,

set http_proxy=<your_http_proxy:proxy_port>
set https_proxy=<your_https_proxy:proxy_port>

To configure composer behind http proxy, Http Proxy

Paulraj
  • 3,373
  • 3
  • 36
  • 40