#26280 [Bgs]: update query cut off with ascii char > 128
| From: | jochen dot daum at cabletalk dot co dot nz | Date: | Tue, 18 Nov 2003 01:18:18 +0000 |
| Subject: | #26280 [Bgs]: update query cut off with ascii char > 128 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-50565@lists.php.net to get a copy of this message | ||
ID: 26280
User updated by: jochen dot daum at cabletalk dot co dot nz
Reported By: jochen dot daum at cabletalk dot co dot nz
Status: Bogus
Bug Type: MSSQL related
Operating System: Linux Debian woody
PHP Version: 4CVS-2003-11-16 (stable)
New Comment:
Thats sounds right. In SQl Server profile the statement arrives as
update test set field = 'ࠉ
, so something cuts it off in between. So you tested with what
transmission method. I'd like to post that bug with freetds
Previous Comments:
------------------------------------------------------------------------
[2003-11-17 19:11:15] fmk@php.net
I have no problem with with your code, tested it on Mandrake 9 and SQL
Server 2000. It could be a bug in FreeTDS though?
------------------------------------------------------------------------
[2003-11-16 21:45:54] jochen dot daum at cabletalk dot co dot nz
Description:
------------
Hi!
An update query, which contains a character with an ascii code > 128
gets cut off at the position of the character and not executed, because
apparently the syntax is wrong.
Test script:
<?
error_reporting(E_ALL);
$c = mssql_connect ("10.1.1.1:1433", "xxxxx", "xxxxx");
mssql_select_db("xxxxxx", $c);
$sql = "update test set field = 'test' where id=1";
$res = mssql_query ($sql, $c);
?>
result:
Warning: mssql_query(): message: Unclosed quotation mark before the
character string '?.H.????????..??'. (severity 15) in
/var/www/cabletalk/test.php on line 11
Warning: mssql_query(): message: Line 1: Incorrect syntax near
'?.H.????????..??'. (severity 15) in /var/www/cabletalk/test.php on
line 11
Warning: mssql_query(): Query failed in /var/www/cabletalk/test.php on
line 11
Found this bug in php-4.3.2, my config-line:
./configure --with-mysql --with-apxs
--with-crack=/var/www/install/cracklib2.7 --with-mssql --with-gd
--with-png-dir --enable-gd-native-ttf --with-ttf --with-curl
--enable-wddx --with-zlib-dir= --with-informix=/opt/informix
--enable-sockets --with-freetype-dir --with-ldap
Then confirmed it in php4-STABLE-200311170030 with the same config
line.
I use freetds-dev/testing 0.61-4 on debian woody
Reproduce code:
---------------
see above
Expected result:
----------------
to run the update statement. It runs in SQL Server Query Analyzer
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26280&edit=1