#22911 [Opn->Fbk]: Setting odbc.defaultlrl = 0 results in FATAL: emalloc(): Unable to allocate
ID: 22911
Updated by: kalowsky@php.net
Reported By: wbarnett at ncta dot com
-Status: Open
+Status: Feedback
Bug Type: ODBC related
Operating System: Windows 2000
PHP Version: 4.3.2RC1
New Comment:
Can you tell me if this is with SQL Server, and which MDAC is being
used?
Previous Comments:
------------------------------------------------------------------------
[2003-03-26 16:18:11] wbarnett at ncta dot com
Error:
CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:
FATAL: emalloc(): Unable to allocate 2012964085 bytes
Note that setting the Setting odbc.defaultlrl = 131072 (as high as I
needed to go methinks) works just fine.
Cant get a GDB Backtrace.
Script that generates:
<?php
$DBName='SpamGenerator';
$DBUser='Admin';
$DBPass='';
function ODBCConnect(){
global $DBName;
global $DBUser;
global $DBPass;
$cnx=odbc_connect($DBName, $DBUser, $DBPass);
return $cnx;
}
function GenerateMainTable(){
$cnx=ODBCConnect();
$strSQL="SELECT MailID, MailName, MailDate FROM sysMail";
if (isset($_GET['SortOrder'])){
$SortOrder=$_GET['SortOrder'];
$strSQL.=" ORDER BY $SortOrder";
}
$cur=odbc_exec($cnx, $strSQL);
$TableDef="<td class=\"Main\">";
while (odbc_fetch_row($cur)){
$MailID=odbc_result($cur, "MailID");
$MailName=odbc_result($cur, "MailName");
$MailDate=date('m.d.y', strtotime(odbc_result($cur, "MailDate")));
echo "<tr>$TableDef<center><a
href=\"MailDetail.php?MailID=$MailID\">$MailID</center></td>$TableDef
$MailName </td>$TableDef<center>$MailDate</center></td></tr>";
}
odbc_close($cnx);
}
GenerateMainTable();
?>
Data it is pulling is pretty simple--an integer ID, a string for name
and a date value.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22911&edit=1
Thread (6 messages)