Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) #99

Closed
peldax opened this issue Jun 2, 2016 · 4 comments
Closed
Labels

Comments

@peldax
Copy link

peldax commented Jun 2, 2016

Hi

I installed your driver on our linux server yesterday (compiled from source i downloaded from github). I have to use MSAccess together with MySQL because our client relies on application which use it. MSAccess database file has 60 Mb. We have PHP application with Nette framework and our problem is that odfc_fetch_fetch array throws following error:

Allowed memory size of 1073741824 bytes exhausted (tried to allocate 3730789209 bytes)

This behavior doesn't make any sense, because the database is only 60mb big.

/etc/odbc.ini file:

[Northwind]
Description = MDBTools
Driver = /usr/local/lib/libmdbodbc.so
Database = /srv/www/pohoda.mdb

PHP code that throws error:

$sql = 'SELECT ID, Firma, Jmeno, Utvar, Obec, Ulice, PSC,
                       Firma2, Jmeno2, Utvar2, Obec2, Ulice2, PSC2,
                       ICO, DIC, Tel, Tel2, RefStr
                FROM AD';
$res = odbc_exec($this->getConnection(), $sql);

while ($row = odbc_fetch_array($res)) // error is thrown here
{
    // 
}

PHP odbc connection:

odbc_connect('Driver={libmdbodbc.so};DBQ=' . $dataDir . '/' . $dataFile, '', ''));

Have you encountered similar problem? Do you have an idea how to avoid this problem? Then don't hesitate and reply. :)

@smentink
Copy link

I'm having the same issue, is there any way to fix this?

@evanmiller evanmiller added the bug label Sep 2, 2020
@evanmiller
Copy link
Contributor

Hi, we have many improvements to the ODBC driver in #162. Please try that code and let me know if it fixes your issue.

@peldax
Copy link
Author

peldax commented Sep 2, 2020

Hi, I dont use the MSAccess nor the driver anymore.

@evanmiller
Copy link
Contributor

@peldax Thanks for letting me know. I am closing the issue. If anyone experiences the same issue on the latest code, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants