[code]
[03-Oct-2012 15:34:39] PHP Warning: ZipArchive::open() [ziparchive.open]: Empty string as source in /Applications/[removed]/phpdocx_pro/classes/CreateDocx.inc on line 533
[03-Oct-2012 15:34:39] PHP Warning: ZipArchive::extractTo() [ziparchive.extractto]: Permission denied in /Applications/[removed]/phpdocx_pro/classes/CreateDocx.inc on line 1045
[/code]
My first step was to check the write permissions on the folders the script was running in, and the folder to which the document was to be saved. But, these permissions were correct. Further investigation revealed that the problem was the lack of write permissions on my PHP TMP directory. Adding the correct permissions fixes the issue.
(To find your PHP temporary directory, create a <?php phpinfo(); ?> file and look for the TMPDIR value. Note that on the Mac, you'll need to open Macintosh HD with hidden folders visible to find the /var/ directory).