|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38518 Unable to allocate when deleting last row
Submitted: 2006-08-20 09:18 UTC Modified: 2007-07-31 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jelle at v-essen dot nl Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 5.1.5 OS: Windows XP SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-08-20 09:18 UTC] jelle at v-essen dot nl
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:
$adminApplyUpdateID = $_POST['applyID'];
$sqlDeleteApply = "DELETE FROM tblApply
WHERE id = $adminApplyUpdateID";

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-20 09:22 UTC] 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:

$connectDriver = 'DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=data.mdb;';
$conn = odbc_connect($connectDriver,'','');

Maybe it's the driver...
 [2007-07-23 12:05 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

And try using the PDO ODBC driver instead. It has been reported to work much better..
 [2007-07-31 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Nov 28 10:01:26 2023 UTC