Forum


Replies: 5   Views: 2754
Createdocxfromtemplate not working?
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 InnovativeP  · 22-10-2018 - 23:19

Error while trying to open the (base) template as a zip file ERROR

We have tried:

1. checked ZipArchive on server.

2. Set permission to read/write on temp directory on server.

3. Tried other paths. /temp and absolute path in config file.

4. Tried sample code provided with sample templates.

Are there any other suggestions and the error continues.

Thanks in anticipation.

Posted by admin  · 23-10-2018 - 06:38

Hello,

It seems the path to the DOCX you are trying to use as template doesn't exist or it's not a DOCX but other file (a DOC or any other file). Please check and test the included samples with the included DOCX files. We have tested the class and it's working perfectly.

Regards.

Posted by InnovativeP  · 23-10-2018 - 06:54

Thanks for your assistance.

I have tried these fixes and neither work. I triewd your template which is NOT zipped and it does not work. I tried the absolute path in the config file, it still did not work.

Any other ideas?

Thanks,

Simon

Posted by admin  · 23-10-2018 - 07:15

Hello,

All DOCX files are ZIP, including all the included in the package. Please do the following test: run the included sample examples/Templates/replaceVariableByText/sample_1.php using PHP CLI mode without changing anything in the code.

For further support, please send to contact[at]phpdocx.com a way to access your server (SSH connection) and the path where phpdocx is installed and the dev team will check it directly.

Regards.

Posted by InnovativeP  · 23-10-2018 - 08:51

LOL. 

Yes, did that from the beginning. 

Its OK. Just found trhe problem and it was poor service from the Host and had nothging to do with PHPDOCX.

Moving to a new HOST new. :)

FYI - Blue Host are the most pahetic service provider I have ever come across.