[thelist] pre-project planning
Brady Mitchell
mydarb at gmail.com
Thu Mar 20 11:34:54 CDT 2008
On Mar 20, 2008, at 907AM, Jeremy Weiss wrote:
> I'm about embark on a project that's going to require me to cycle
> through 5
> to 10 text files, massage the data a bit, and then import them into a
> database. The file sizes will vary with 15 MB being the highest we
> 'should'
> encounter. This will be the first such project I've done. I'll be
> using PHP
> 5 and MySQL 5.
>
> I already know that I'm going to need to check the size limits for
> fopen/fread. I'm wondering are there are any other potential
> gotcha's that I
> need to watch for?
Be sure to check and increase the following directives in php.ini as
needed:
max_execution_time = 30 ; Maximum execution time of each script,
in seconds
max_input_time = 60 ; Maximum amount of time each script may spend
parsing request data
memory_limit = 32M ; Maximum amount of memory a script may
consume (8MB)
Be sure to check out the following functions, depending on how your
text files are formatted, one of them may be more appropriate / easier
to use than fopen/fread:
http://php.net/file
http://php.net/file_get_contents
http://php.net/fgetcsv
HTH,
Brady
More information about the thelist
mailing list