By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,037 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,037 IT Pros & Developers. It's quick & easy.

iOS 5 Lion: mysql_connect(): php_network_getaddresses: getaddrinfo failed:

P: 1

Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/denniswest/Documents/JQueryMobileSite_65/www/ajax.php on line 4



You don't have permission to access /ajax.php on this server.

Apache/2.2.20 (Unix) DAV/2 Server at localhost Port 80
Nov 24 '11 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,639
you donít connect via http. hence mysql_connect("localhost","root","root");. but I recommend to use PDO or MySQLi instead of the outdated mysql_* functions.

PS. you donít connect via the root account either, because anyone who applies SQL Injections is able to delete your database or perform other unwanted adminstrative tasks. therefore connectioīng through a standard user account which only has select/insert/update permissions is more secure.
Nov 24 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.