Forum


Replies: 1   Views: 3729
Error while trying to open the (base) template as a zip file
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 Adam Steff  · 18-04-2018 - 04:38

Hello,

I've downloaded the trial version 'phpdocx-trial-basic-7.5' and I'm receiving the following error when I try to create a word document from scratch follow your installation tutorial.

Fatal error: Uncaught Exception: Error while trying to open the (base) template as a zip file in /Users/adamsteff/Development/sites/producerAPI/phpdocx/classes/AutoLoader.inc(62) : eval()'d code on line 100

Exception: Error while trying to open the (base) template as a zip file in /Users/adamsteff/Development/sites/producerAPI/phpdocx/classes/AutoLoader.inc(62) : eval()'d code on line 100.

require_once $_SERVER['DOCUMENT_ROOT'] .'/phpdocx/classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addText('Hello world!');
$docx->createDocx('hello_world');

All the PHPDocX configuration tests came back successful.

  • OK PHP version is 7.0.18
  • OK Zip support is enabled.
  • OK DOM support is enabled.
  • OK XML support is enabled.
  • OK Tidy support is enabled.
  • OK mbstring is enabled.

PHP_VERSION: 7.0.18
PHP_OS: Darwin
PHP_UNAME: Darwin Adams-MacBook-Pro.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
SERVER_NAME: api.adaptlx.com
SERVER_SOFTWARE: Apache/2.4.28 (Unix) PHP/7.0.18
SERVER_ADDR: 127.0.0.1
SERVER_PROTOCOL: HTTP/1.1
HTTP_HOST: api.adaptlx.com
HTTP_X_FORWARDED_FOR:
PHP_SELF: /index.php
ZipArchive: 1
DomDocument: 1
SimpleXMLElement: 1
Tidy: 1
mbstring: 1


I've also run sudo chmod -R 777 on the phpdocx directory so I have read/write access to all the files.

Any help would be much appreciated, as I'm wanting to test the API so we can purchase it.