php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28105 changing some characters when communicating with MSSQL database under Apache1
Submitted: 2004-04-22 12:26 UTC Modified: 2004-04-22 21:03 UTC
From: tomasz at biznespolska dot pl Assigned: fmk (profile)
Status: Not a bug Package: MSSQL related
PHP Version: 4.3.6 OS: windows 2000 Server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tomasz at biznespolska dot pl
New email:
PHP Version: OS:

 

 [2004-04-22 12:26 UTC] tomasz at biznespolska dot pl
Description:
------------
Configurations on which I've noted this bug:
Windows 2000 Server, Apache1.3.29, PHP(tested versions: 4.3.3 and 4.3.6, both CGI and SAPI module), SQL Server 7.0

This bug is NOT present under Apache2 and IIS.

Some of Polish characters are changed to completely different chars, while communicating with a MSSQL7. Example below is best description of problem.

As a production server I use Apache2 + PHP, but because it is recommended to use Apache1 with PHP, so I've tried to downgrade, and then I've encountered this problem.

Now I'm running Apache2 on port 80 and Apache1 on port 88, so this is link to script with bug:
http://www.biznespolska.pl:88/test.php
and same script through Apache2 (without the bug):
http://www.biznespolska.pl/test.php

My changes in php.ini:
extension=php_mssql.dll
mssql.datetimeconvert = Off
mssql.textlimit = 100000
mssql.textsize = 100000
mssql.max_procs = 250

Reproduce code:
---------------
// connection to database already established
echo $sql = "SELECT '??'";
echo "<br />\n";
$re = mssql_fetch_row(mssql_query($sql));
echo $re[0];


Expected result:
----------------
SELECT '??'
??

Actual result:
--------------
SELECT '??'
?-

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-22 21:03 UTC] fmk@php.net
This is not a bug in PHP, but a feature in the DB Library from Microsoft. The DB library uses OEM to ANSI convertions depending on the context the library is used in (CLI,CGI,SAPI).

You can control how values are returned from the 'Client Network Utility'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 08:01:28 2024 UTC