Problem with pg_connect() in PHP - Mailing list pgsql-sql

From James Kitambara
Subject Problem with pg_connect() in PHP
Date
Msg-id 355378.64960.qm@web27906.mail.ukl.yahoo.com
Whole thread Raw
Responses Re: Problem with pg_connect() in PHP
Re: Problem with pg_connect() in PHP
List pgsql-sql
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="font: inherit;" valign="top"><p class="MsoNormal"
style="MARGIN:0in 0in 10pt"><font face="Calibri" size="3">Dear Members of </font><p class="MsoNormal" style="MARGIN:
0in0in 10pt"><font face="Calibri" size="3">I have installed the Apache 2.0.61,<span style="mso-spacerun: yes"> 
</span>PHP5.2.4 and PostgreSQL 8.1 on my local computer.</font><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><font
face="Calibri"size="3">All three software were successfully tested. I changed “<i style="mso-bidi-font-style:
normal">;extension=php_pgsql.dll”</i><span style="mso-spacerun: yes"> </span>to </font><p class="MsoNormal"
style="MARGIN:0in 0in 10pt"><font size="3"><font face="Calibri"><i style="mso-bidi-font-style:
normal">“extension=php_pgsql.dll”</i><span style="mso-spacerun: yes">   </span>in the php.ini file in order to enable
PostgreSQLin PHP.</font></font><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><font face="Calibri" size="3">The
problemcomes when I try to connect to the PostgreSQL Database using php function pg_connect</font><p class="MsoNormal"
style="MARGIN:0in 0in 10pt"><span style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #7f9fbf; LINE-HEIGHT: 115%;
FONT-FAMILY:'Courier New'; mso-highlight: white">$dbconn</span><span style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR:
black;LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight: white"> = </span><span style="FONT-SIZE: 10pt;
BACKGROUND:white; COLOR: #7f7f9f; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight:
white">pg_connect</span><spanstyle="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY:
'CourierNew'; mso-highlight: white">(</span><span style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #2a00ff;
LINE-HEIGHT:115%; FONT-FAMILY: 'Courier New'; mso-highlight: white">"host="</span><span style="FONT-SIZE: 10pt;
BACKGROUND:white; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight:
white">.PG_HOST_NAME.</span><spanstyle="FONT-SIZE: 10pt;BACKGROUND: white; COLOR: #2a00ff; LINE-HEIGHT: 115%;
FONT-FAMILY:'Courier New'; mso-highlight: white">" port="</span><span style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR:
black;LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight: white">.PG_PORT_NUM.</span><span style="FONT-SIZE:
10pt;BACKGROUND: white; COLOR: #2a00ff; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight: white">" <span
style="mso-spacerun:yes"> </span>dbname="</span><span style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black;
LINE-HEIGHT:115%; FONT-FAMILY: 'Courier New'; mso-highlight: white">.PG_DB_NAME.</span><span style="FONT-SIZE: 10pt;
BACKGROUND:white; COLOR: #2a00ff; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight: white">"
user="</span><spanstyle="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier
New';mso-highlight: white">.PG_USER.</span><span style="FONT-SIZE: 10pt; BACKGROUND: white;COLOR: #2a00ff; LINE-HEIGHT:
115%;FONT-FAMILY: 'Courier New'; mso-highlight: white">" password="</span><span style="FONT-SIZE: 10pt; BACKGROUND:
white;COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-highlight: white">.PG_PASSWORD);</span><font
face="Calibri"size="3"> </font><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN"
style="mso-ansi-language:EN; mso-bidi-font-weight: bold"><font size="3"><font face="Calibri">All the arguments in the
functionpg_connect() are defined.</font></font></span><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><font
size="3"><fontface="Calibri"><span lang="EN" style="mso-ansi-language: EN; mso-bidi-font-weight: bold">Unfortunately I
amgetting the Fatal error</span><span lang="EN" style="mso-ansi-language: EN">: “<i style="mso-bidi-font-style:
normal">Callto undefined function pg_connect() in <span style="mso-bidi-font-weight:
bold">C:\Web\html\Staff_Management\example1.php</span>on line <span style="mso-bidi-font-weight:
bold">23</span></i><spanstyle="mso-bidi-font-weight: bold">”</span></span></font></font><p class="MsoNormal"
style="MARGIN:0in 0in 10pt"><span lang="EN" style="mso-ansi-language: EN; mso-bidi-font-weight: bold"><font
size="3"><fontface="Calibri">C:\Web\html is my document root.</font></font></span><p class="MsoNormal" style="MARGIN:
0in0in 10pt"><span lang="EN" style="mso-ansi-language: EN; mso-bidi-font-weight: bold"><font size="3"><font
face="Calibri">Whatcould be the possible mistake? </font></font></span><p class="MsoNormal" style="MARGIN: 0in 0in
10pt"><spanlang="EN" style="mso-ansi-language: EN; mso-bidi-font-weight: bold"><font size="3"><font
face="Calibri">Anyoneto assist me!</font></font></span><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span
lang="EN"style="mso-ansi-language: EN; mso-bidi-font-weight: bold"><font size="3"><font face="Calibri">Best
regards,</font></font></span><pclass="MsoNormal" style="MARGIN: 0in 0in 10pt"><span lang="EN" style="mso-ansi-language:
EN;mso-bidi-font-weight: bold"><font face="Calibri" size="3">James Kitambara</font></span></td></tr></table><br /> 

pgsql-sql by date:

Previous
From: Louis-David Mitterrand
Date:
Subject: Re: exclusion query
Next
From: Robert Edwards
Date:
Subject: Re: Problem with pg_connect() in PHP