Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problems with upgrade to 0.63 php-5.0.5

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Allan Kim <akim AT freedom.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problems with upgrade to 0.63 php-5.0.5
  • Date: Mon, 28 Nov 2005 13:47:37 -0800

For more debugging information turn on FreeTDS logging -- just uncomment one line in freetds.conf.

Here are a few possibilities:

1. The OOP model changed after PHP 5.0.4. In particular you can't pass a literal value as an argument if the method expects a reference.

See if it helps to rewrite this line:

$dbconn->InParameter($stmt,$centro_costo,'id_area');

as:

$foo = 'id_area';
$dbconn->InParameter($stmt,$centro_costo,$foo);


2. MSSQL returns trivial notices or warnings that get picked up as errors. Here's where the FreeTDS debugging logs will help. Sometimes wrapping your database calls in a try/catch block will help. There's no logical reason why it should work, but it does.

Good luck Aliet.

Aliet Santiesteban Sifontes wrote:
Hi people, I'm upgrading a server at school, it had freetds-0.62.4 and php-5.0.2, this server was hosting lot's of php applications wich uses stored procedures to connect to a sql server 2000 and return recordsets, this setup was working great, but we are upgrading to debian to do some tests, we are using freetds-0.63 and php-5.0.5, first we hit the bind bug in php code, applied the patch, the bind problem was solved but now we are loosing the php object and stored procedures are not working, we are using php adodb, a fragment of code:
...
list($dbconn) = swDBGetConn();
// Get Desc Area
$query = 'Get_Area_Desc';
// this is a stored procedure, very simple, // just make a select of a table with //one input paramenter of type varchar
$stmt = $dbconn->PrepareSP($query); $dbconn->InParameter($stmt,$centro_costo,'id_area'); $result = $dbconn->Execute($stmt);
if($dbconn->ErrorNo() != 0) {
die("Error con la consulta de la descripción del áreas");
}
list($cod_area, $nombre_area) = $result->fields;
$result->Close();
When executes $result->Close(); it returns this
Fatal error: Call to a member function Close() on a non-object in
/var/www/test/devel/modules/SW-Finanzas/instance/submayor.php on line 178
In previous setup this same code works ok.
Any ideas...
Best Reagards


---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds







Archive powered by MHonArc 2.6.24.

Top of Page