ID: 9816
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: ODBC related
Operating system: windows 2000 sp1
PHP Version: 4.0.5
Description: FATAL: emalloc(): Unable to allocate

This is a microsoft ODBC issue with Windows 2000 SP1, when you query with concatenated 
fields it returns a size of 2GB.  Read more at:

They haven't released a fix for it yet, It seems that you could check to see if it 
returned 2GB.  Do you think there is any chance of us getting a patch for this?

Previous Comments:

[2001-05-10 08:38:53] [EMAIL PROTECTED]
user reports (btw please use the bug system):

*sigh*...Still fails in 4.0.5...thanks just the same. Let me know if there's
anything else I can do...

tested on:

Windows 2000 Server, SP1
PHP4.0.5 CGI
Access97, called using odbc_exec

query: "SELECT LastName & ', ' & FirstName AS pName FROM Borrowers"

error: FATAL:  emalloc():  Unable to allocate 2147483599 bytes


[2001-05-07 21:35:30] [EMAIL PROTECTED]
Please try the recently released 4.0.5 to see if this is
corrected for you.


[2001-04-29 22:49:00] [EMAIL PROTECTED]
I got the same error when I tried (in numerous ways) to get the concatenation of two 
fields returned "AS" a new fieldname:

My example query:

SELECT BorrowerId, [FirstName] & [LastName] AS BName FROM Borrowers

FATAL: emalloc(): Unable to allocate 2147483599 bytes 

I tried '+', '|', and '&' as concatenation operators, tried CONCAT(a, b) -- I had 
heard that there was supposedly an internal odbc function called CONCAT that's 
supposed to be driver independent, though I'm not quite sure how that would work in 
practice -- and I even tried creating an Access "Query"/View/StoredProcedure called 
BorrowerNames using the query above. When I then issued a "SELECT * FROM 
BorrowerNames", I still got the error.

Windows 2000 Server, SP1
PHP 4.0.4pl1 (CGI)
Access 97
using odbc_exec() to Access 97 database


[2001-04-27 08:32:09] [EMAIL PROTECTED]
Another user commented:

I just have read the bug-report 9816 at and want to answer your email.
Yes, the users are right: I had the same problems with FATAL:emalloc() using the same 
odbc-queries to get information out of two ms access tables. The first table only 
contains Customer-ID and pasword, the second contains customer adress and a 
remark-field (data type memo)
user authentication for login taken from table 1 -> OK
hello text for user from table 2 -> FATAL:emalloc()
Result of Test enviroment - after some nights of installation :-) :
1) Win2000, MS Access2000, IIS5 and PHP4.0.4 : FATAL:emalloc()
2) Win2000, MS Access2000 SP1, IIS5 and PHP4.0.4 : FATL:emalloc()
3) Win2000, MS Access2000 SP1, Apache 1.3 and PHP 4.0.4 : FATAL:emalloc()
4) Win NT 4, MS Access2000, IIS4 and PHP 4.0.4: OK, no errors
5) Win NT 4, MS Access2000, Apache 1.3 and PHP 4.0.4: OK, no errors
The next days I try to debug the source code to find out what the trigger of emalloc() 
realy is.  Our new Webserver should be a Win2000 Server with Apache and PHP.  
Therefore we need to know where the emalloc() error comes from.
If you want know our results of debugging please send me an email to 


[2001-04-16 22:54:23] [EMAIL PROTECTED]
Can someone with access to Windows2000 please test this out and either confirm or deny 
this report?  User reports this won't happen under Win98SE and that is currently all I 
have access to...


The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to