#22911 [NEW]: Setting odbc.defaultlrl = 0 results in FATAL: emalloc(): Unable to allocate

From: Date: Wed, 26 Mar 2003 22:18:11 +0000
Subject: #22911 [NEW]: Setting odbc.defaultlrl = 0 results in FATAL: emalloc(): Unable to allocate
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36516@lists.php.net to get a copy of this message
From:             wbarnett at ncta dot com
Operating system: Windows 2000
PHP version:      4.3.2RC1
PHP Bug Type:     ODBC related
Bug description:  Setting odbc.defaultlrl = 0 results in FATAL:  emalloc():  Unable to allocate 

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



Thread (6 messages)

« previous php.bugs (#36516) next »