473,382 Members | 1,093 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,382 software developers and data experts.

Edward

Hi!, First i'm a beginner working with php. And i've a problem working
with that and postgresql of course, i cann't connect both.
I've been working with debian sid, and like usually the webserver is
apache; the error is something like thist: "error .... cannot locale
host:localhost...", but i try to do this: "# psql -h localhost -U xxx -p
5432 -d test " and i make connection.

In test.php, i change localhost by 127.0.0.1, and nothing, the same
error, and phpinfo() work.

So is somebody help me. thanks!
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #1
1 1111
On Monday 29 September 2003 14:41, ej**@epca.com.ve wrote:
Hi!, First i'm a beginner working with php. And i've a problem working
with that and postgresql of course, i cann't connect both.
I've been working with debian sid, and like usually the webserver is
apache; the error is something like thist: "error .... cannot locale
host:localhost...", but i try to do this: "# psql -h localhost -U xxx -p
5432 -d test " and i make connection.

In test.php, i change localhost by 127.0.0.1, and nothing, the same
error, and phpinfo() work.


Perhaps choose a more informative subject next time :-)

This is almost certainly a typing error in your PHP connection string. It
should be something like:

$conn = pg_connect("host=localhost dbname=test user=test password=tpass");

If your connect string is of that type, please give the *exact* error message
you receive.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
by: Edward K. Ream | last post by:
Hello all, First of all, my present state of mind re pep 318 is one of sheepish confusion. I suspect pep 318 will not affect Leo significantly, but I am most surprised that an apparently...
42
by: Edward Diener | last post by:
Coming from the C++ world I can not understand the reason why copy constructors are not used in the .NET framework. A copy constructor creates an object from a copy of another object of the same...
34
by: Duncan McNutt [BSDM] | last post by:
Is it possible to have ranges or patterns in a case ? If not, why wasnt this designed in to make it easier instead of listing every case value needed? -- Duncan McNutt Microsoft Product...
3
by: John Salerno | last post by:
This is an example in the book I'm reading: string fullName = " Edward C Koop "; fullName = fullName.Trim(); string names = fullName.Split(' '); string firstName = names; //...
4
by: Edward van Nijmweegen | last post by:
Hello, I developing some code that will select a few value and together they will be presented in a table (datagrid). But i have the following issues/question: 1. How can i add just one row...
16
by: Edward | last post by:
Hi All, I am having huge problems with a very simple dotnet framework web page (www.gbab.net/ztest3.aspx) , it does NOT render correctly under Apple's Safari. The DIV's do not align amd float as...
127
by: sanjay.vasudevan | last post by:
Why are the following declarations invalid in C? int f(); int f(); It would be great if anyone could also explain the design decision for such a language restricton. Regards, Sanjay
6
by: =?Utf-8?B?RWR3YXJk?= | last post by:
hi everybody, There is an error that drives me crazy and I can't figure out why VB.net behaves this way. I have a form and a textbox and the following code in the form Loads event Dim Ab As...
14
by: =?Utf-8?B?RWR3YXJk?= | last post by:
Hi everybody, To me the following code shouldn't work but it does ! Imports system.String Dim x As String="This,is,a,test" Dim y(1) As String y=x.Split(",") TextBox1.text=y(3) why "Y" which is...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.