Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8536561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:41:50+00:00 2026-06-11T10:41:50+00:00

I have a php file with around 100mb which is full of arrays (only

  • 0

I have a php file with around 100mb which is full of arrays (only arrays).

I’ve made a script that includes this file (for processing), first it exhausted the default Xampp 128mb memory limit, i’ve raised it to 1024mb but it just takes forever and doesn’t do anything.

I’m sure the problem is being created by the sheer size of the file because i’ve tried removing all lines of code and just leaving the include and an echo for me to know when it finishes executing, and it does the same thing (which is taking forever), i’ve also tried to run the 100mb file in separate and same thing again.

A 10mb file is taking forever as well but a similar 1mb file is almost instantly read and executed so the problem must be more than just the file size.

I was avoiding using c++ for a simple project as this and would rather not to as php is easier for me and the task that will be executed doesn’t need to benefit from the added speed that it would have if it had been done in c++ but if i have no luck in solving this problem i guess i’ll have to.


EDIT

Reasons for not using a database:
1-Whoever made it didn’t used a database and it will be pretty hard to store this in an organized database if i’m not able to do something with it first, like just reading it, copying parts from it or putting in memory or something.

2-I don’t have experience working with databases as pretty much all stuff i’ve ever done in php didn’t needed large amounts of stored data, 50kb at best, if i was thinking about a big project or huge chunks of data as this one, i definitely would, but i didn’t made this mess to start with and now i have to undo it.

3-The logic for having to store a small portion of data like 10mb in hard drive when now every computer has pretty much enough ram to fit the whole OS in it is pretty much incomprehensible unless someone gives a good explanation about it, if i had to access a lot of said files simultaneously i would understand but like i said, this is a simple project, this is the only file that will be accessed at a given time this isn’t even to make some kind of website, it’s to run a few times and be done with it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:41:51+00:00Added an answer on June 11, 2026 at 10:41 am

    Step 1: throw out the web server. There should be a php executable somewhere, just run your script with that: /path/to/php script.php

    That way you will at least see what’s happening directly.

    Step 2: make sure you actually have enough free RAM. If not… get a better machine. PHP arrays are a very complex structure and will swap in and out every iteration if you don’t.

    Step 3: make sure the problem is with the include. Add some echo right after it, see if it executes.

    If everything else fails, try parsing the file line by line. Depending on the format, it might be easier to eval() the code or parse it with a regex, it’s up to you.

    Also:

    3-The logic for having to store a small portion of data like 10mb in
    hard drive

    Any decent DB will keep a copy of the data in RAM anyway. The difference is that DBMS are optimized to store and access it efficiently. Of course, there are a few tasks that are done more efficiently by getting the whole dataset into the program, but you don’t want to use a web page for that. (see step 1 above)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP File with something like this: <script type=text/javascript> var page =
The setup: I have a standard .php file (index.php) that contains two includes, one
I have a PHP file that contains a large array (about 90KB). I'm considering
i have a php file which stores a variable, and i need to create
I have a php file which checks for login and password from users database,
I have a php file which has some variables like $name1, $name2... How can
I have a PHP file which my clients will execute on their server. It
I have a PHP file which will return something like <div id=title>Add Us On
I have a PHP class that, upon instantiation, creates a file that is unique
This is something that has always bothered me about PHP and I have never

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.