I ll let Pervasvive know they need to change the sample. I ve got some contacts there. As for using PSQL from a Linux box, you don t mention what version of PSQL you are using but you ll need the PSQL client for Linux. Here s a sample I ve used before to test connectivity from PHP on Linux (and WIndows) to a PSQL server. In the odbc_connect, the "Demodata" is the ODBC DSN name. The other two parameters are user name and password. You would need to compile (or enable) ODBC in PHP.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>PHP Sample</TITLE>
</HEAD>
<BODY>
<?php
$conn=odbc_connect("Demodata","","","");
$sql="select * from class";
$rs=odbc_exec($conn,$sql);
echo "<table border=1>
";
$numfields = odbc_num_fields($rs);
for($i=1;$i<=$numfields;$i++){
$fn=odbc_field_name($rs,$i);
echo "<th>$fn</th>";
}
echo "
";
while(odbc_fetch_row($rs)){
echo "<tr>
";
for($i=1;$i<=$numfields;$i++){
$fv=odbc_result($rs,$i);
echo "<td>$fv</td>";
}
echo "</tr>
";
}
echo "</table>
";
echo "<p>Number of Fields: $numfields</p>
";
?>
</BODY>
</HTML>