[thelist] Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.
Brady Mitchell
mydarb at gmail.com
Wed Oct 17 11:29:45 CDT 2007
You need to enable the postgres extension for PHP. Open php.ini and find
the line ";extension=php_pgsql.dll" and remove the ; from the beginning.
Once you do that and restart apache you should be able to use the
postgres functions from php.
If you're not familiar with phpinfo(), take a look at it. Create a php
file and call the phpinfo function and browse to it. This function gives
you all kinds of information about PHP including which extensions are
enabled, where php.ini is located, and more.
I don't know what you're asking in questions 3 and 4 - are you asking
how to install postgres? Go to http://www.postgresql.org/download/ and
follow the links there - that page also lists some graphical clients.
Brady
jothi jothi wrote:
> i am a student doing a project in using php and xampp server..now i have t use posgresql..i had installed the posgresql ready...but when i got below errors as i comile one of the coding...
>
>
> Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.
>
> Fatal error: Call to undefined function: pg_connect() in C:\Program Files\xampp\htdocs\posgre.php on line 54
>
>
> 1.can some one explain to me ,how n recompile the php?
> 2.Why the pg_connect function is undefined?
> 3.How i know that i have installed the posgresql correctly?
> 4.How i can run the server?
>
>
> below is my coding....
> <html>
> <body>
> <table border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td>
> ID
> </td>
> <td>
> voltage
> </td>
> <td>
> temp
> </td>
> <td>
> light
> </td>
> <td>
> accel_x
> </td>
>
> <td>
> accel_y
> </td>
>
> <td>
> mag_x
> </td>
>
> <td>
> mag_y
> </td>
>
> <td>
> mic
> </td>
>
>
> <td>
> Time
> </td>
>
> </tr>
> <?php
> $conn = pg_connect("host=localhost
> port=5432
> dbname=task
> user=tele
> password=tiny");
>
> $query = "SELECT * FROM sample_mts310";
> $result = pg_query($query);
> if (!$result) {
> echo "Problem with query " . $query . "<br/>";
> echo pg_last_error();
> exit();
> }
> while($myrow = pg_fetch_assoc($result)) {
> printf ("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>", $myrow['Id'], $myrow['voltage'], $myrow['temp'], $myrow['light'],$myrow['accel_x'],$myrow['accel_y'],$myrow['mag_x'],$myrow['mag_y'],$myrow['mic'],$myrow['time']);
> }
> ?>
> </table>
> </body>
> </html>
>
>
>
> your help is very much appreciated...
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
More information about the thelist
mailing list