Problem: Kept getting FATAL: emalloc() errors when using basic select statements via odbc for informix .... 
Solution: Cast the columns to an informix odbc friendly type...I chose varchar(255)
example: select description::varchar(255) from objects;
Don't go through the 4 hours I just went through for this..you :-) me :-(

解决方案 »

  1.   

    When running the CGI version of 4.0.6 under windows, I came across this error when trying to call a stored procedure in SQL Server using odbc_execute w/ the parameter array set:
    FATAL:  emalloc():  Unable to allocate 268675669 bytes
    Scary error, huh? In my case it just meant that SQL Server couldn't find the stored procedure.  Totally my fault, but a rather nondescript error message.
    p.
      

  2.   

    Having trouble with pesky TEXT datatypes? Try the query 'set textsize 555555555;' to set the limit on how much a TEXT will return.
    Symptoms of the problem are hanging web browsers and "FATAL:  emalloc():  Unable to allocate -2147483648 bytes" errors in apache's error.log