[php-maint] Bug#400269: php5-odbc segfault
Ivan Sergio Borgonovo
ivan.s.b at gmail.com
Fri Nov 24 20:35:20 UTC 2006
Package: php5-odbc
Version: 5.2.0-6
Severity: normal
I just build up a simple script in php (cli) to connect to a remote
MS SQL server using unixodbc and tdsodbc (in sarge it has another
name).
On sarge I can connect through isql *and* through the simple php
script.
On sid I can just connect through isql, the same simple script
segfault.
#!/usr/bin/php -q
<?php
$db_dsn="DSNNAME";
$db_user="USERNAME";
$db_pass="PASSWORD";
if ($conn=odbc_pconnect($db_dsn, $db_user, $db_pass)) {
$SQLstr = "SELECT top 10 * FROM sysobjects";
$rs = odbc_exec($conn,$SQLstr);
while($row = (odbc_fetch_array($rs)))
print_r($serv);
} else { print "no connection\n"; }
?>
What I did is explained in more details here:
http://www.webthatworks.it/drupal/2006/11/db/odbc_freetds_and_microsoft_sql_and_php
But the substance is what I've already explained above.
The box is an amd64x2.
thx
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
More information about the pkg-php-maint
mailing list