Hello,
The method importHeadersAndFooters removes the existing headers and footers and adds the new ones from the imported DOCX.
Maybe there's a cache problem on your server? Maybe you could try using PHP CLI mode and one of the included examples. To know where the problem comes from we'd need to check it directly.
Regards.