Jump to content

akarin

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

akarin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks btherl. I'm guessing there might be some dependencies missing and so the php wasn't installed properly with pgsql support. At first I used the postgres installer it failed to complete the installation. I added manually some of the lib files when I was building from source. Now I uninstalled the postgres and run the installer again. This time is runs fine and I was able to install the pre-packaged apachephp. Finally it works!
  2. Some code from a small test file I'm testing with echo pg_escape_string("A-B'C"); returns $db = pg_connect('host=localhost dbname=db1 user=pgadmin password=admin'); $query = "SELECT * FROM student"; $result = pg_query($query); if (!$result) { echo "Problem with query " . $query . "<br/>"; echo pg_last_error(); exit(); } $op = pg_affected_rows($result); $op = pg_cmdtuples($result); echo "<TABLE>"; while($myrow = pg_fetch_assoc($result)) { printf ("<tr><td>%s</td><td>%s</td><td>%s</td></tr>", $myrow['id'], htmlspecialchars($myrow['program']), htmlspecialchars($myrow['stage'])); } echo "</table>"; if I comment out the pg_affected_rows and pg_cmdtuple lines then the code works fine.
  3. Hi, I've been having trouble getting php to work with postgresql. While I can do things like pg_connect, pg_query, pg_fetch_assoc with out any problems, a number of pg_ functions such as pg_affected_rows, pg_cmdtuples, pg_escape_string are returning Fatal error: call to undefined function. What could be the cause? I'm using php 5.2.13 (built from source) apache 2.2.15 (built from source) postgres 8.4.2 (linux installer) thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.