From:             jochen dot daum at cabletalk dot co dot nz
Operating system: Linux Debian woody
PHP version:      4CVS-2003-11-16 (stable)
PHP Bug Type:     MSSQL related
Bug description:  update query cut off with ascii char > 128

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 bug report at http://bugs.php.net/?id=26280&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26280&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26280&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26280&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26280&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26280&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26280&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26280&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26280&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26280&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26280&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26280&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26280&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26280&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26280&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26280&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26280&r=float

Reply via email to