Forum


Replies: 4   Views: 4084
Stubborn permissions errors? try this.
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 peterhartree  · 03-10-2012 - 16:52

Hi folks. Just a heads up - I was having trouble getting started with PHPdocX PRO on my MAMP PRO development environment. None of the demos worked, so I checked my logs and found the following:
[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).