ID:               26835
 User updated by:  skissane at ics dot mq dot edu dot au
 Reported By:      skissane at ics dot mq dot edu dot au
-Status:           Feedback
+Status:           Closed
 Bug Type:         MSSQL related
 Operating System: Solaris 2.6
 PHP Version:      4.3.4
 New Comment:

Upon closer investigation, the problem was not with Solaris at all, it
was that the Solaris box was using the mssql_* functions with PHP
configured with --with-sybase=<path to freetds>, and the Linux box was
using the mssql_* functions with --with-mssql=<path to freetds>.
Recompiling PHP on the Solaris box using --with-mssql solved the
problem. This probably relates to the bugs with the sybase extension
which have been reported in other bug reports.

Sorry about wasting your time. (I would mark this bug as Bogus, not
Closed, but it won't let me do that.)


Previous Comments:
------------------------------------------------------------------------

[2004-01-08 01:07:35] [EMAIL PROTECTED]

This seams to be a problem on Solaris or FreeTDS. I've tested the code
on Linux and Win32 and can't reproduce the problem.

The code is designed to return NULL if the db-api returns zero length
data. For some reson NULL bust be translated into a non zero length
value on Solaris.

------------------------------------------------------------------------

[2004-01-07 22:17:35] skissane at ics dot mq dot edu dot au

Description:
------------
The following script returns an empty string on Solaris, when it should
return a NULL (which it does, correctly, on Linux.)

This is using FreeTDS 0.61.2 (same problem occurs with FreeTDS 0.52).

This is talking to a SQL Server 2000 using TDS version 7.0 (switching
to 8.0 made no difference).

I've checked, and:
mssql.compatability_mode = Off
in php.ini.

Reproduce code:
---------------
<?
$id = mssql_connect("<servername>","<username>","<password>");
$q = mssql_query("SELECT NULL",$id);
$f = mssql_fetch_array($q);
echo gettype($f[0]);

Expected result:
----------------
NULL

Actual result:
--------------
string


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26835&edit=1

Reply via email to