#22649 [Opn->Csd]: odbc_connect FATAL: erealloc()
| From: | moriyoshi@php.net | Date: | Wed, 12 Mar 2003 16:25:45 +0000 |
| Subject: | #22649 [Opn->Csd]: odbc_connect FATAL: erealloc() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35440@lists.php.net to get a copy of this message | ||
ID: 22649
Updated by: moriyoshi@php.net
Reported By: ottawasixtyseven at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: ODBC related
Operating System: Windows
PHP Version: 4CVS-2003-03-11 (stable)
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
FYI: The bug was caused by wrong pointer reference passed to spprintf()
(patched by Ilia).
Previous Comments:
------------------------------------------------------------------------
[2003-03-12 09:40:30] ottawasixtyseven at hotmail dot com
This is fixed in the latest 4.3 snapshot March 12 2003.
Thank you for the quick response.
Ottawa
------------------------------------------------------------------------
[2003-03-12 07:38:15] ottawasixtyseven at hotmail dot com
My programmers said my description was note quite accurate. Here is the
programmers version of our problem:
I can't get our application running on the latest snapshot. I can run
phpinfo() but when I try to use
$DB = odbc_connect ( 'database', '', ''); and then try to create a
table I get errors:
include('common.php'); // this include has
$DB = odbc_connect ('dsn' ,'', '');
i do an echo of $DB in common.php and get Resource id #3
then in the main script.
echo "THE VALUE OF THE DB IS : $DB";
$SQL = "CREATE TABLE $TableName ($TableColumns)";
if ( !odbc_exec ( $DB, $SQL ) )
{
echo "FAILURE OF '$SQL' !<br>\n";
$Errors++;
}
else
{
echo "OK! <br>\n";
}
when i echo $DB again just before the odbc_exec I get:
"FATAL: erealloc(): Unable to allocate 1331643757 bytes"
I have tried installing the latest snapshot on three separate servers.
Two that were already running PHP 4.3 and one clean server.
this code works on all other versions of php except the latest
snapshot.
Ottawa
------------------------------------------------------------------------
[2003-03-11 22:17:20] ottawasixtyseven at hotmail dot com
I can't get our application running on the latest snapshot. I can run
phpinfo() but when I try to use $DB = odbc_connect ( 'database', '',
'' ); and then try to create a table I get errors:
echo "THE VALUE OF THE DB IS : $DB";
$SQL = "CREATE TABLE $TableName ($TableColumns)";
if ( !odbc_exec ( $DB, $SQL ) )
{
echo "FAILURE OF '$SQL' !<br>\n";
$Errors++;
}
else
{
echo "OK! <br>\n";
}
For the first echo statement above I get "Resource id #3"
When I try to create the table I get:
"FATAL: erealloc(): Unable to allocate 1331643757 bytes"
I have tried installing the latest snapshot on three separate servers.
Two that were already running PHP 4.3 and one clean server.
Ottawa
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22649&edit=1