Page 1 of 1

File Size Help

Posted: Wed Nov 11, 2009 11:01 am
by chrissodey
Hello,

I have text files that need to be uploaded to mysql, but before that they need to be parsed. They are in excess of 240MB each and my php ini states the post_max_size is 8M, upload_max_filesize is 40M, and the memory_limit is 512M. I do not have access to the php ini file to modify it to accept larger files as it is maintained by my company. The server admin will not raise the limit. Is there any way to get around this? I have tried ini_set('post_max_size','250M'); and it does not work. It will however change the memory_limit, but that doesn't help me.

What I am trying to do is parse through this large text file and assign the values to variables. I will then upload the variables to fields in a mysql database.

Re: File Size Help

Posted: Wed Nov 11, 2009 8:50 pm
by alex.barylski
Hmmm...if I understand correctly the problem you are having is with the script time-out due to the file size?

If your admin won't extend the time allowed and ini_set() doesn't work...you MIGHT be able to implement something using:

http://ca2.php.net/manual/en/function.i ... -abort.php

If not, then maybe you can split the file into smaller chucks first?

Re: File Size Help

Posted: Thu Nov 12, 2009 5:43 am
by chrissodey
Thanks for your reply! I was actually thinking of a possible file split, but I'm not sure how to go about it. Do you have any suggestions?

Thanks

Re: File Size Help

Posted: Thu Nov 12, 2009 10:21 am
by pickle
What about uploading it through FTP?

How about complaining to your boss that the company won't allow you to do your job :?. Seems kind of messed up the company wants you to do this, but won't provide the resources to do it.