/    Sign up×
Community /Pin to ProfileBookmark

file size limit on file function?

Hey…

I am using the file() function to read a csv file into an array. Its working perfectly but the problem comes in when the csv file increases in size. Anything over 1,5 Mb crashes?

Is there a setting in Php which i can change to allow larger csv files?

Have allocated up to 100Mb virtual memory on my server so that doesnt seem to be the problem ? .

anyway…any ideas would be appreciated…thanks!

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 14.2005 — I am not aware of any logical limit imposed by PHP. Could the script, as a result of processing the larger file, be exceeding max_execution_time? If so, you could try increasing it with [url=http://www.php.net/ini_set]ini_set()[/url] (default is 30 seconds).
Copy linkTweet thisAlerts:
@SpectreReturnsSep 15.2005 — php.ini includes an option for max file size.
Copy linkTweet thisAlerts:
@Kag_sauthorSep 15.2005 — Awesome thanks guys...

I used ini_set(max_execution_time, 500); and ini_alter(memory_limit, -1); and everything seems to be working fine.

Shot for the help!
×

Success!

Help @Kag_s spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...