ID:               37757
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nguyenhoang at vnideadesign dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: XP sp2
 PHP Version:      5.1.4
 New Comment:

This is a limitation in Microsofts DBLIB, used to build the extension.

You can switch to php_dblib.dll This is a drop in replacement for
mssql_* functions build with FreeTDS


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

[2006-06-09 07:16:35] nguyenhoang at vnideadesign dot com

Description:
------------
Problem on: PHP 5.1.2 and 5.1.4
OS: Windows XP sp2
Server: Apache ( apache2triad 1.5.4/1.4.4 and WAMP5 with PHP 5.1.4 i
was un/installing each of these server to test)
I'm sure that I connected to MSSQL server 2000 and ran a stored
procedure ( after enable mssql extention ) but i only got the first 255
characters from the remote MSSQL server. From PHP version 5.1.2, I
upgraded it to PHP 5.1.4 but the result is as it was on PHP 5.1.2. Read
the note from other PHP user, i got these way to fix this problem:
-in php file:
mssql_query("set textsize 4000", $s); // <<<<<<<<
ini_set('mssql.textsize', '4000');
ini_set('mssql.textlimit', '4000');
-in php.ini
mssql.textlimit = 4096
mssql.textsize = 4096

After the fix, the result has no changed, always is the first 255 chars
appeared.

Reproduce code:
---------------
Here is the code.
//Connect:
$s = @mssql_connect($myServer, $myUser, $myPass) or die("He Thong dang
ban. Xin ban thu lai trong giay lat. Chung toi rat tiec vi su co nay.
Rat mong ban thong cam..");
$d = @mssql_select_db($myDB, $s) or die("He Thong dang ban. Xin ban thu
lai trong giay lat. Chung toi rat tiec vi su co nay. Rat mong ban thong
cam..");
//.......other code here, then the line to got row Text from MSSQL
database
/*
#GOT INFO - QUERY DATABASE!!!!!!!
*/
$datetime = $d . "/" . $m . "/" . $y;
if ($smstxt[1] == "SAT") {
// Bind datetime
$rs = mssql_query("TG_SAT '$datetime','$enableU2Text'");
} else {
$rs = mssql_query("TG_CAT '$datetime','$enableU2Text'");
}
$row = mssql_fetch_array($rs);
// Display the result
GoKannel($row['Text']); //


Expected result:
----------------
I have no idea to expect what problem with my code. It run perfectly
with other part of the scipt. I wish that the text on MSSQL was not
more than 255 chars, If so this should not be a problem. Maybe there
was a problem with php_mssql.dll extention or maybe I am a stupid PHP
coder :( Hope u can give me an answer. Thanks



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


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

Reply via email to