I am receiving the error while using push notification (adhoc certificate) from php side. like this.
stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known) in /usr/local/www/apache24/data/appmantras/community/apple/push.php on line 19
I have one doubt that where I need to create *.csr file i.e from my development mac system or server system. (Now I have created from my mac system only.)
Related
it shows the following errors :-
mysqli_real_connect(): (HY000/2002): A socket operation was attempted
to an unreachable host.
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): A socket operation was attempted
to an unreachable host.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
This error indicates that the network was not connected or not configured correctly. It is definitely an error on the client machine, not your server.
There isn't much you can do to "solve" the problem. Pretty much all you can do is upgrade the client's network drivers and check for connection problems (maybe they're barely within wireless range, or the Ethernet cable is missing its locking tab).
I have installed my sql database with windows authentication, but now don't know how to connect to it.
The message I am getting is
Error
php_network_getaddresses: getaddrinfo failed: No such host is known.
/the database is on my local PC and I copied the path to it which is
"C:\Users\MyName\Documents\My Web Sites\For evaluation-3col\App_Data\test.sdf"
so the command line is
$dbc = mysqli_connect("C:\Users\MyName\Documents\My Web Sites\For evaluation-3col\App_Data\test.sdf")
or die(mysqli_connect_error())
I am a very new person to this and would really appreciate help.
Thanks
When I connect to the network using the local network connection I am unable to establish a connection to my server. It returns the following error:
Warning: mysqli::mysqli(): (HY000/2002): 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. in C:\xxxx\htdocs\xxxx.xxxx\class\class.mysql.php on line 11
Connect Error (2002) 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.
Warning: mysqli::close(): Couldn't fetch mysql in C:\xxxx\htdocs\xxxx.xxxx\class\class.mysql.php on line 59
Now when I tether through my phone I have no problems connecting to the server.
My knowledge of networking is extremely ignorant so do forgive me if this is obvious, but what could some of the issues be stopping my connection to the server?
I have figured out the answer to the problem I was experiencing. I am documenting below, just in case it helps anyone else.
=========================
I recently came across a problem when working through the 4th edition of Kevin Yank's "Build Your Own Data-Driven Website."
There appears to be an incompatibility between certain software packages and operating systems. In particular, this affects PHP 5.3 when trying to connect to MySQL while running on Windows Vista with Apache. It is not really a bug, but a discrepancy between how far along the different elements are in the transition from IPv4 to IPv6.
Basically, when PHP tries to connect to the database, it times out because it does not recognize localhost, only 127.0.0.1, and produces the following error message:
=========================
Warning: mysqli_connect() [function.mysqli-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpmysql-4\chapter4\connect\index.php on line 2
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2002): 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. in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpmysql-4\chapter4\connect\index.php on line 2
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phpmysql-4\chapter4\connect\index.php on line 2
=========================
There are two possible solutions to this problem:
=========================
Replace "localhost" with "127.0.0.1" in all PHP files that you wish to have connect to a MySQL database
Locate the "hosts" file on your computer. It is typically at a location such as this:
C:\Windows\System32\drivers\etc\hosts
Open it up, and comment out the line that prevents the localhost from "mapping" correctly; in otherwords, change
::1 localhost
to
::1 localhost
This solution was, in fact, presented in the SitePoint forums previously, though without a full explanation of the details.
http://www.sitepoint.com/forums/showthread.php?t=637612
=========================
The issue is described in detail on the PHP forum at the following link:
http://bugs.php.net/bug.php?id=45150
Please note that -- from what I understand -- Windows XP does not have this problem, as it is configured only to IPv4. Vista runs into a problem because it is designed to handle both, as is Windows 7.
Also, I should mention that using PHP 5.2 with the aforementioned book is not recommended because there is a bug in that version -- a veritable one -- that causes Apache to crash when it attempts to open the "deletejoke" file.
I trying to establish a socket communication from PHP client to C target, But I am always getting warning error as below:
Warning: socket_connect(): unable to connect [10061]: No connection could be made because the target machine actively refused it.
Note:
I am already tried the links:
http://www.pmoghadam.com/homepage/HTML/c-php-unix-domain-socket.html
socket_connect(): unable to connect [10061] - target machine actively refused it
I have installation of magento 1.6.1 on local machine i\’m trying to connect magetno\’s api in php using following code
$proxy = new SoapClient('http://localhost/magento/api/v2_soap/?wsdl');
$sessionId = $proxy->login('apiuser', 'apikey');
I can connect using this code if internet connection on, If I make it off it doesn't work.
it gives following errors
Warning: SoapClient::SoapClient() [soapclient.soapclient]: php_network_getaddresses: getaddrinfo failed: No such host is known. in E:\wamp\www\magentomanager\api\products.php on line 12
Warning: SoapClient::SoapClient(http://schemas.xmlsoap.org/soap/encoding/) [soapclient.soapclient]: failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in E:\wamp\www\magentomanager\api\products.php on line 12
please let me know what is the reason behind that?.
why magento needed internet connection for accessing local api. how do I access api without having without internet connection?
Magento's API is based on SOAP, as you may have found out. SOAP is based on XML and uses therefor schema files, which desribes the schema/layout for the SOAP calls for this service. So this file might be loaded before/on every SOAP call.
However, a workaorund could be to store the schema description on your local machine and editing Magento's wsdl.xml files, so that they will reference to your local machine. Simply search for the URL in all xml files inside your Magento installation.
Not a very nice workaround, but hey,... it's a workaround.
I think the problem is that localhost can't be resolved to your local IP or 127.0.0.1. You can add it in your host file or call it thru http:/// instead of http://localhost