问题
I am using a dbase extension in PHP to open up a large DBF of 4.5+ GB but it seems to give bum records from 9.6 million onward even though the database looks perfectly fine in any viewer, etc.
Do I need to somehow crank up a memory limit somewhere?
回答1:
try setting limits on the number of records on show, use pagination and limit to about 15, this should help. I have never heard of PHP not opening a file because of size however you could be putting too much data on a page and causing an overflow.
回答2:
You mention a 4.5 gig "dbf" database file. From a historical development of dBASE (way back), and FoxPro / Visual FoxPro, they were based one 32-bit O/S and the maximum individual file size was 2 gig. By having a 4.5 gig, I would suspect the .dbf is handled by another program... Such as Sybase Database-Advantage-Server which supports and extends older .dbf formats and allows exceeding that 2 gig file limit. I would make sure which database connection handlers you are working with.
来源:https://stackoverflow.com/questions/18241425/is-there-a-size-limit-to-opening-files-in-php