Replies: 4   Views: 3385
Help cannot create simple doc
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 hhwebteam  · 11-08-2016 - 11:13

Hi Guys,

New to phpdocx. I have the corp version of the software and am just trying to work my way through setting up a simple document but am getting constant errors. I have this hosted locally on my mac and have followed the instructions to create a doc but keep getting the following.

Can anyone please help me. Again using OSX


Warning: copy(): Filename cannot be empty in /Applications/XAMPP/xamppfiles/htdocs/securesign/library/phpdocx/classes/ on line 633

Warning: ZipArchive::open(): Empty string as source in /Applications/XAMPP/xamppfiles/htdocs/securesign/library/phpdocx/classes/ on line 636

Posted by hhwebteam  · 11-08-2016 - 11:15

This what i have so far.


require_once 'library/phpdocx/classes/';

$docx = new CreateDocx();
$text = 'Phpdocx. Easily create Word and PDF documents online';


$filename = 'tutorial_2.docx';

Posted by admin  · 11-08-2016 - 11:25


It seems your server can access your temp folder correctly.

Please run the same script using PHP CLI mode and check your server log to find any error.
In the file config/phpdocxconfig.ini you can set a custom temp path.


Posted by hhwebteam  · 11-08-2016 - 11:33

I have never used PHP CLI mode to run the file can you point me in the right direction on how to run it from within php?

Posted by admin  · 11-08-2016 - 11:47


You just need to run the script using a terminal and the PHP executable, for example:

$ php script.php