Apache runs out of memory using unified odbc to MS SQL
| From: | busker at busker dot org | Date: | Tue, 15 Apr 2003 11:38:45 +0000 |
| Subject: | Apache runs out of memory using unified odbc to MS SQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27091@lists.php.net to get a copy of this message | ||
Hi,
Apache 2.0.44 on NT(sp?)
PHP 4.3.1
MS SQLServer 2000 + sp(s) on NT
(Sincere apologies about the choice of platform & DB, working on a UNIX
solution, burocracy is stifling.)
Using unified ODBC driver to connect to DB (don't want too many hooks into
shitty SQL server).
Problem: If I do two nested statements, apache runs out of memory and bombs
out. If I make the statements sequential, this is not a problem.
E.g.
Prepare (get some numbers)
Execute
While ( get id ) {
Instanciate some object from DB using id
}
The above doesn't work, but if I grab all the numbers into an array and
free the statement handle and then start my new statement, it all works:
Prepare
Execute
while (fetch) {stuff into array};
foreach (array) {stuff new object out of DB into array}
Anyone seen this before? Bug in unified ODBC or SQLServer?
Note that if I don't properly "free" the statement handles, things get messy
in both cases.
Gerd.