• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Memory allocation error

Hi Experts,

I´m using a DOM Class that reads a html file.

public function file_get_html() {
          $dom = new lib_dom_dom();
          $args = func_get_args();
          @$dom->load(call_user_func_array('file_get_contents', $args), true);

When i call my script (test.php) via the browser everything works fine. it reads the html file.

When i try to call the php file via the console it gives me the following error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1848 bytes) in... ...dom/dom.class.php

I don´t understand why i can call the script directly via the webbrowser with no memory error, but i cannot call it via the console.
1 Solution
bibabutzeAuthor Commented:
The php limit is already on 128MB

If this would be the problem it would not work out when i call the php fle via the webbrowser... it has to be a problem with the calling of the script via the console...
php for windows will have more then one php.ini file,

one for the web server and one for the command line. I would check to make sure that both have a 128 mb limit and not just the web server one.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now