Jump to content

Recommended Posts

Just changed server to eom.com ini_set not allowed allow_long_arrays not allowed problem is I have string when exploded by \n it returns over 3 million lines of data 130M. worth max_memory is only 64Mb how can I  use php to solve this problem?

My thought is create the array while($source then create the array in the while statement possible ??????

 

FYI this is from a zipped csv folder my old server provider I had it working fine lol

but the difference is about 1,918 USD a year to allow long arrays and ini_set lol

downside my old server was down for 4 a total of 4 weeks in the last 2 years and I have to think of customers I host for. Have my own server but here but no T connections here. : (

 

Any advice would be appreciated

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/204088-how-to-get-around-allow_long_arrays-off/
Share on other sites

Your problem has nothing at all to do with allow_long_arrays, you might want to look at what that actually does (or see ignace's post for a hint). As for your problem, I would say this is pretty clearly a case of not having the right equipment for the job. 130Mg of data is allot for most systems to be manipulating. What exactly are you doing with this data?

Answer unzip maxminds  geocitylite zip file worked fine on the old server problem when writing it creates a huge array unless.there is a way to split a string by \n without creating an array!

 

Sorry having a few beers right now been waking up at 3pm most days recently trying to get back into morning to evening mode :)

Hi Thope one of my first teachers here and I will say thanks for that but if you can't process a file in one go from .zip because of memory allocation how is $_GET $_POST or $_COOKIE going to handle the long arrays or memory limit problem?  Yes the new equipment sucks I certainly won't be showing that in public. I set up the server in Apache and turned safe mode off I don't know how they can Even say they support php only on their settings the other option was Php cgi any thoughts?

So, does your web host allow php settings in a local php.ini (when php is running as a CGI application) or in a .htaccess file (when php is running as an Apache Module)?

 

If you post the code you are currently using, so that we can get the big picture of what you are actually doing, someone would be able to suggest ways of doing it within a restricted amount of memory.

 

Assuming you are placing this data into a database, have you tried importing the unzipped csv data using your favorite database management tool?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.