php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26280 update query cut off with ascii char > 128
Submitted: 2003-11-16 21:45 UTC Modified: 2003-11-17 20:18 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jochen dot daum at cabletalk dot co dot nz Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4CVS-2003-11-16 (stable) OS: Linux Debian woody
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jochen dot daum at cabletalk dot co dot nz
New email:
PHP Version: OS:

 

 [2003-11-16 21:45 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-17 19:11 UTC] 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-17 20:18 UTC] jochen dot daum at cabletalk dot co dot nz
Thats sounds right. In SQl Server profile the statement arrives as

update test set field = '&#2057;

, so something cuts it off in between. So you tested with what transmission method. I'd like to post that bug with freetds
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 05:05:45 2022 UTC