File Size Help

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
chrissodey
Forum Newbie
Posts: 2
Joined: Wed Nov 11, 2009 10:54 am

File Size Help

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: File Size Help

Post 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?
chrissodey
Forum Newbie
Posts: 2
Joined: Wed Nov 11, 2009 10:54 am

Re: File Size Help

Post 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
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: File Size Help

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply