[thelist] Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

jothi jothi jthjothi at yahoo.com
Wed Oct 17 08:52:49 CDT 2007


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