Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No memory error #78

Open
jerfeson opened this issue Dec 16, 2021 · 1 comment
Open

No memory error #78

jerfeson opened this issue Dec 16, 2021 · 1 comment

Comments

@jerfeson
Copy link

Hello,
Recently I have been having problems with parsing some XML files using nusoap, these problems happen because the sent envelopes are too large.

Since this is legacy software, any kind of change has a monster impact.

I noticed that by changing a parameter within the nusoap lib this error stops occurring.

According to my understanding this piece of code just breaks the XML file into several smaller parts so that the parser process can be done.

nusoap.php line : 6793

 $chunkSize = 256;
  for($pointer = 0; $pointer < strlen($xml) && empty($parseErrors); $pointer += $chunkSize) {
   $xmlString = substr($xml, $pointer, $chunkSize);
   if(!xml_parse($this->parser, $xmlString, false)) {
    $parseErrors['lineNumber'] = xml_get_current_line_number($this->parser);
    $parseErrors['errorString'] = xml_error_string(xml_get_error_code($this->parser));
   };
  }
@f3l1x
Copy link
Member

f3l1x commented Jul 26, 2022

Hi. Could you please prepare PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants