composer update on mac not working - php

Since I updated my PHP version to 5.4, I have trouble to update composer on my symphony 2 project.
$ php composer.phar update
gives me:
The "https://packagist.org/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
_https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
[RuntimeException]
Failed to execute git status --porcelain --untracked-files=no
error: bad index file sha1 signature
fatal: index file corrupt
Here is link to a screenshot:
http://sanofuzir.com/Screen.jpg
What should I do?

it's more likely that you can't even ping the url on the console.
then try the solution here: https://discussions.apple.com/message/10713911#10713911
just refresh your DHCP address, and it works for me!

Related

Composer Installer warning no such host is known, failed to open stream

I am trying to install composer on windows 10 I am getting the following error, and when I am trying to enter composer -v through cmd I am getting error also, means composer not installed in my computer, The error or warning I am getting is this
"The "https://getcomposer.org/versions" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
The "https://getcomposer.org/download/1.10.10/composer.phar.sig" 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 failed because connected host has failed to respond.
Please help some one.
You can try again but everything is working now. Maybe there is some network issue at your end (firewall, proxy, etc).
Download composer.phar instead https://getcomposer.org/composer-stable.phar
and then you can run "php composer-stable.phar".

Getting error in Composer setup

I am installing Composer software in my system, but it is showing given below error. Please suggest a solution.
The "https://getcomposer.org/versions" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
failed to open stream: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.

Is there any way to check .PEM file is Valid or not in iOS?

I have created production AdHoc .pem files. I have followed this steps:
By using This Link
I created .PEM file and i checked does this valid or not by using following command like:
$php simplepush.php
but i am getting an error like::
Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/mac-jarc/Desktop/SimplePush/simplepush.php on line 21
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known) in /Users/mac-jarc/Desktop/SimplePush/simplepush.php on line 21
Failed to connect: 0 php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
But in my PHP developer said it's a .PEM file mistake . I tought it's not(Because i am very sure my .PEM file is perfect) and i suggested to him like it's a server ports issue
Can you please help me out regarding this:: How would i check does my .PEM file is valid or not.
Here is my php code:

Updating PHP errors due to php_network_getaddresses failed error

So this morning I discover my website payment forms where breaking and on further investigation I discovered that it would appear that my server (Ubuntu 14.4) is unable to connect to the outside world, namely:
Running from CLI:
$php composer.phar self-update
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded:
php_network_getaddresses: getaddrinfo failed: Name or service not
known failed to open stream: php_network_getaddresses: getaddrinfo
failed: Name or service not known
or a dig:
$ dig www.google.com
; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> www.google.com ;; global
options: +cmd ;; connection timed out; no servers could be reached
Apache:
exception 'ErrorException' with message 'stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known'
Similar posts on stack: here would suggest I change name servers...
So I am thinking that I should set up the server to use googles name servers:
nameserver 8.8.8.8
nameserver 8.8.4.4
How is this done on Ubuntu 14.4 ?

PHP - Installing Composer - failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known

I am attempting to use the Composer Dependency Manager for PHP, but I am experiencing the following issue when I use the Composer-Setup.exe (Win32 installer).
Download failed: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
Download failed: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
Download failed: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
The download failed repeatedly, aborting.`
I followed the advice on several other stackoverflow threads for that error, and I've checked some other forums. In my php.ini, I have made sure I have the following options:
allow_url_fopen = On
allow_url_include = On
extension=php_openssl.dll
I also tried the manual installation of Composer, which asks you to execute:
php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
I get the same error from that. However, If I remove "/installer", it can retrieve the source. I have verified that that the "/installer" URL works. What configuration could cause this behavior? I'm running PHP 5.4 on 32-bit Windows 7.
Thanks,
Andrew
This issue was actually the proxy variables. While the console was picking up the changes, PHP required a system restart to pick it up. So unsetting the environment variables and restarting allowed the Composer installer to retrieve the required files. Thanks Seldaek for your recommendation to check the proxy.
Solution 1
Ensure you have connectivity try ping www.google.com
Solution 2
- Remove Proxy settings ,they could be ones causing it,if outside a corporate network
Solution 3
Add the corporate proxy setting if on a corporate network
set http_proxy=http://your_proxy:your_port
set http_proxy=http://username:password#your_proxy:your_port
set https_proxy=https://your_proxy:your_port
set https_proxy=https://username:password#your_proxy:your_port
mysqli_connect('root','', 'localhost', 'people');
You are passing root in as hostname.
try this
mysqli_connect('localhost','root', '', 'people');
this will connect to localhost with username root passwoord "" and default database people.
maybe better to change localhost with 127.0.0.1

Categories