php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32110 MSSQL connection crash when set mssql.textlimit and mssql.textsize
Submitted: 2005-02-25 15:21 UTC Modified: 2005-02-26 00:23 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: marcos at ivirtua dot com dot br Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.10 OS: Linux
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: marcos at ivirtua dot com dot br
New email:
PHP Version: OS:

 

 [2005-02-25 15:21 UTC] marcos at ivirtua dot com dot br
Description:
------------
I need to retrive more than 4k from a blob field (rtf text).

I've set these values in my php.ini:

mssql.textlimit = 2147483647;
mssql.textsize = 2147483647;

Everything works fine using CGI, but when using SAPI (dll) after some operations I can't connect to database anymore. A server restart is needed, and everything works fine again for some time, and crash again.

I'm using Apache/1.3.33 (Win32) PHP/4.3.9, but it still happens in Apache 2.0 (Linux) PHP/4.3.10




Reproduce code:
---------------
Use PHP ISAPI.
<?
ini_set("mssql.textlimit", "2147483647");
ini_set("mssql.textsize", "2147483647");

mssql_connect('db_host', 'db_user', 'db_pass'); 		
mssql_select_db('db_name'); 

$qry= mssql_query('select myblobfield from table');
$row=mssql_fetch_row($qry);
echo($row_aux[0]);
?>

Repeat for some times (10, 20, 30 times, etc).

Expected result:
----------------
The full content of blob field, wich has more then 100KB, every time I run the code.

Actual result:
--------------
The full content of blob field for just some times. After a period, the server must be restarted because I can't connect with:

mssql_connect('db_host', 'db_user', 'db_pass'); 		
mssql_select_db('db_name'); 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-25 15:24 UTC] marcos at ivirtua dot com dot br
Sorry, the echo line must be:

echo($row[0]);

All the rest keep the same.
 [2005-02-26 00:23 UTC] fmk@php.net
The MSSQL library used for this extension is not thread safe, and mght cause problems under any threaded web server.

DBTEXTLIMIT is not supported by FreeTDS. I'll commit a patch for this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 13:01:27 2024 UTC