473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

1
<?php
mysql_connect("http://localhost","root","root");
mysql_select_db("cmi_test");
....
?>

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

-------------

Forbidden

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
1 4774
Dormilich
8,658 Expert Mod 8TB
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

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

Similar topics

2
by: Steve | last post by:
Visitors to my site have been getting a random error. It's been happening more and more frequently lately. ______________________________ Warning: Unknown(): php_network_getaddresses: getaddrinfo...
0
by: Matt | last post by:
I'm trying to get the HTML data off of a webpage. Let's say for the sake of argument it's the python homepage. I've googled around and found some examples that people said worked. Here's what...
0
by: StevePBurgess | last post by:
Hi - I am using this url_exists function: to check whether files exist on other peoples webservers (before allowing my users to add the site to their directory of rss feeds). On my current shared...
4
by: edcdave | last post by:
I'm trying to get MoinMoin 1.5.4 running with Python 2.3.4 (installed from an SCO Skunkworks binary). Python 2.3.4 (#1, Aug 27 2004, 18:22:39) on sco_sv3 One of the MoinMoin modules attempts to...
1
by: Henry16 | last post by:
Never seen such a situation ! Do you have once faced this problem ? We use a fsockopen to retrieve a content from a URL . The content is dispalid corretly on a page on one of our servers. But...
0
by: cole007 | last post by:
Hi all, New to this forum so thought would start off with a query that has been causing me some problems. Trying to work with remote images using gd libraries and get the following message:...
2
by: John Nagle | last post by:
Here's a strange little bug. "socket.getaddrinfo" blows up if given a bad domain name containing ".." in Unicode. The same string in ASCII produces the correct "gaierror" exception. Actually,...
3
by: sandipbhoi | last post by:
Hello all, I have implemented a integration of payment gateway with paypal. Currently my site is hosted at a shared server. The site under test was working properly till there was no change on...
5
by: _q_u_a_m_i_s's | last post by:
Hy, i have a problem with PHP 5.1.6 I have a script containing something like this: $f=fsockopen("www.site01.com",80,$errNo,$errStr); var_dump($f); When accessing this from apache, i get...
0
by: jinsue | last post by:
Hi all, I am having trouble getting a client/server relationship to connect; receiving the above error. Python 2.6.5, Win7 On one end we have the socket being bound and that is all working with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.