This is a multi-part message in MIME format.
------=_NextPart_000_001A_01C37207.331F6960
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by hosting.commandprompt.com id h83HcZK18299
I=92m a PHP/PostGRE newbie. I=92m getting this error:
Warning: pg_connect(): Unable to connect to PostgreSQL server: could not
connect to server: Connection refused Is the server running on host
localhost and accepting TCP/IP connections on port 5432? . in
/export/home/tsc/a/delete-action.phtml on line 156
Couldn't make a connection!
This is the code I=92m trying to run:
$connection =3D pg_connect("host=3Dlocalhost dbname=3Daddress user=3Daddr=
ess
password=3Daddress");
This is my pg_hba.conf
local all all password
This is the output of =93netstat =96an | grep 5432=94
unix 2 [ ACC ] STREAM LISTENING 27649 /tmp/.s.PGSQL.54=
32
I=92m able to do =93psql =96u address=94 and supply and username and pass=
word as any
Unix user defined in the system.
Can anyone tell me what I=92m doing wrong? Thanks.
------=_NextPart_000_001A_01C37207.331F6960
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:filelist.xml [at] 01C37207.32E9DA70">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:DrawingGridHorizontalSpacing>6 pt</w:DrawingGridHorizontalSpacing>
<w:DisplayHorizontalDrawingGridEvery>2</w:DisplayHorizontalDrawingGridEve=
ry>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
{mso-style-type:personal-compose;
mso-ansi-font-size:10.0pt;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:black;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US style=3D'tab-interval:.5in'>
<div class=3DSection1>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 color=3Dblack
face=3DArial><span style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font=
-family:
Arial'>I’m a PHP/PostGRE newbie.<span style=3D"mso-spacerun: yes">&nb=
sp; </span>I’m
getting this error:<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 color=3Dblack
face=3DArial><span style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font=
-family:
Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font><=
/span></p>
<p class=3DMsoNormal><b><font size=3D3 color=3Dblack face=3DArial><span
style=3D'font-size:12.0pt;font-family:Arial;color:black;font -weight:bold'>W=
arning</span></font></b><font
color=3Dblack face=3DArial><span style=3D'font-family:Arial;color:black'>:
pg_connect(): Unable to connect to PostgreSQL server: could not connect to
server: Connection refused Is the server running on host localhost and
accepting TCP/IP connections on port 5432? . in <b><span style=3D'font-weig=
ht:
bold'>/export/home/tsc/a/delete-action.phtml</span></b> on line <b><span
style=3D'font-weight:bold'>156</span></b><br>
Couldn't make a connection!</span></font><font color=3Dblack face=3DArial><=
span
style=3D'font-family:Arial;color:black;mso-color-alt:windowt ext'><o:p></o:p=
></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>This is the code I’m trying to=
run:</span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>$connection =3D
pg_connect("host=3Dlocalhost dbname=3Daddress user=3Daddress password=
=3Daddress");</span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>This is my pg_hba.conf</span></font>=
<font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>local<span style=3D"mso-spacerun:
yes"> </span>all<span style=3D"mso-spacerun:
yes"> </span>all<span style=3D"mso-spacerun:
yes"> &nbs=
p;
</span>password</span></font><font color=3Dblack><span style=3D'color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>This is the output of “netstat=
–an | grep
5432”</span></font><font color=3Dblack><span style=3D'color:black;mso=
-color-alt:
windowtext'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>unix<span style=3D"mso-spacerun: yes=
">
</span>2<span style=3D"mso-spacerun: yes"> </=
span>[
ACC ]<span style=3D"mso-spacerun: yes">
</span>STREAM<span style=3D"mso-spacerun: yes">
</span>LISTENING<span style=3D"mso-spacerun: yes">
</span>27649<span style=3D"mso-spacerun: yes"> </span>/tmp/.s.PGSQL.5=
432</span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>I’m able to do “psql =
211;u address” and
supply and username and password as any Unix user defined in the system.</s=
pan></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'>Can anyone tell me what I’m do=
ing
wrong?<span style=3D"mso-spacerun: yes"> </span>Thanks.</span></font>=
<font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New Roman">=
<span
style=3D'font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![e=
ndif]></span></font><font
color=3Dblack><span style=3D'color:black;mso-color-alt:windowtext'><o:p></o=
:p></span></font></p>
</div>
</body>
</html>
------=_NextPart_000_001A_01C37207.331F6960--
