Forum


Replies: 3   Views: 4878
"domdocument::loadxml(): empty string supplied as input" after create document from template
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by david.costa@swyftfilings.com  · 31-07-2018 - 06:39

Hi, I am creating a document from template, but it throws:

"message": "DOMDocument::loadXML(): Empty string supplied as input",
    "exception": "ErrorException",
    "file": "/var/app/current/packages/corp/phpdocx/src/Classes/Phpdocx/Transform/TransformDocAdvHTML.php",
    "line": 877,
    "trace": [
        {
            "function": "handleError",
            "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
            "type": "->"
        },
        {
            "file": "/var/app/current/packages/corp/phpdocx/src/Classes/Phpdocx/Transform/TransformDocAdvHTML.php",
            "line": 877,
            "function": "loadXML",
            "class": "DOMDocument",
            "type": "->"
        },
        {
            "file": "/var/app/current/packages/corp/phpdocx/src/Classes/Phpdocx/Transform/TransformDocAdvHTML.php",
            "line": 249,
            "function": "getMetaValues",
            "class": "Phpdocx\\Transform\\TransformDocAdvHTML",
            "type": "->"
        },
        {
            "file": "/var/app/current/packages/corp/document/src/Models/Entities/DocumentOrder.php",
            "line": 109,
            "function": "transform",
            "class": "Phpdocx\\Transform\\TransformDocAdvHTML",
            "type": "->"
        },

 

I double checked the files folder and the both docx files (template and document are there)

I ran check.php and everything is ok

PHP_VERSION: 7.0.25
PHP_OS: Linux
PHP_UNAME: Linux ip-172-31-30-207 4.9.76-3.78.amzn1.x86_64 #1 SMP Fri Jan 12 19:51:35 UTC 2018 x86_64
SERVER_NAME: 
SERVER_SOFTWARE: 
SERVER_ADDR: 
SERVER_PROTOCOL: 
HTTP_HOST: 
HTTP_X_FORWARDED_FOR: 
PHP_SELF: check.php
ZipArchive: 1
DomDocument: 1
SimpleXMLElement: 1
Tidy: 1
mbstring: 1