Forum


Replies: 4   Views: 4096
Difficult to understand error...
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 marcushjortsberg  · 21-10-2013 - 16:56

Hi!



I have used the same code for a long time now and all of a sudden I get an error, what is this???



 



Warning: log4php: It looks like your code is using an __autoload() function. log4php uses spl_autoload_register() which will bypass your __autoload() function and may break autoloading. in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/lib/log4php/LoggerAutoloader.php on line 22 Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 605 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 607 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 615 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 621 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 627 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 632 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 637 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 642 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 647 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 652 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 657 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 662 Warning: ZipArchive::statName(): Invalid or unitialized Zip object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 667 Warning: DOMDocument::loadXML(): Empty string supplied as input in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 424 Fatal error: Call to a member function appendChild() on a non-object in /customers/0/7/5/mysite.se/httpd.www/PHPDOCX/classes/CreateTemplate.inc on line 430


Posted by jorgelj  · 22-10-2013 - 09:10

Hello,



This is the error I see:



Warning: ZipArchive::statName(): Invalid or unitialized Zip object



It seems the DOCX is not valid. Please check if you can open the DOCX and try another one.



Regards.


Posted by 37Stars  · 03-12-2013 - 17:10

Here is my code:



if (isset($_POST["firstname"]))

{



 $name = $_POST["firstname"];

 $filename = '_output/' . $name;



 require_once './classes/CreateDocx.inc';

 

 $docx = new CreateDocx();

 $docx->addTemplate('_wordDocs/template.doc');

 $docx->addTemplateVariable('NAME', $name);

 $docx->createDocx($filename);

 

 echo '<a href="' . $filename . '">Your new file</a>';



}



 



And the Error:



Warning: ZipArchive::getFromName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53



Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53



Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53



Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53



Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 57



Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 57



Warning: ZipArchive::statName(): Invalid or unitialized Zip object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 57



Warning: DOMDocument::loadXML(): Empty string supplied as input in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53



Fatal error: Call to a member function appendChild() on a non-object in C:\xampp\htdocs\doc2pdf\classes\AutoLoader.inc(2) : eval()'d code on line 53


Posted by 37Stars  · 03-12-2013 - 17:52

I updated the template from a doc file to a docx file.