#38518 [Opn->Fbk]: Unable to allocate when deleting last row
| From: | jani@php.net | Date: | Mon, 23 Jul 2007 12:05:41 +0000 |
| Subject: | #38518 [Opn->Fbk]: Unable to allocate when deleting last row | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115345@lists.php.net to get a copy of this message | ||
ID: 38518
Updated by: jani@php.net
Reported By: jelle at v-essen dot nl
-Status: Open
+Status: Feedback
Bug Type: ODBC related
Operating System: Windows XP SP2
PHP Version: 5.1.5
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
And try using the PDO ODBC driver instead. It has been reported to work
much better..
Previous Comments:
------------------------------------------------------------------------
[2006-08-20 09:22:59] jelle at v-essen dot nl
This happens whenever I try to delete the last row in a table, not only
in this script, but in any of them.
Oh, I forgot to post a part of the code, which might be very useful:
<?php
$connectDriver = 'DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=data.mdb;';
$conn = odbc_connect($connectDriver,'','');
?>
Maybe it's the driver...
------------------------------------------------------------------------
[2006-08-20 09:18:15] jelle at v-essen dot nl
Description:
------------
I've seen more people have emalloc() errors, but their situations seem
other than my situation. Whenever I try to delete the last row from a
table, it fails. I haven't found a solution in other bug reports.
Oh, yeah: the first time I tried the script, I got a php-cgi.exe error
message. When I refreshed the page, I got the emalloc error.
Reproduce code:
---------------
<?php
$adminApplyUpdateID = $_POST['applyID'];
$sqlDeleteApply = "DELETE FROM tblApply
WHERE id = $adminApplyUpdateID";
odbc_exec($conn,$sqlDeleteApply);
?>
Expected result:
----------------
The row where the field id contains variable $adminApplyUpdateID is
deleted.
Actual result:
--------------
When only one row is left in the table, and I try to delete it, it
fails, and the following message appears.
FATAL: emalloc(): Unable to allocate 1953394532 bytes
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38518&edit=1