Forum


Replies: 9   Views: 4171
Writing permissions
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 lamalama  · 05-06-2015 - 08:56

I've set a custom absolute path to a temporary folder. The folder has CHMOD 777. Nevertheless I get an error: Warning: copy(example_addText_2.docx): failed to open stream: Permission denied in /phpdocx/classes/CreateDocx.inc on line 3346 This has to do with the copy() function. Anybody suggestions how to find the cause of the error?

Posted by admin  · 05-06-2015 - 10:36

Hello, Please run the script using the PHP CLI mode and check the folder rw access. That error only appears when there's an read/write access deny. Regards.

Posted by lamalama  · 17-06-2015 - 14:54

The problem is resolved as follows: Within the copy function at /phpdocx/classes/CreateDocx.inc on line 3346 we had to adjust the $filename. We had to prefix the $filename with the absolute path to the tmp folder. We also had to do this at /phpdocx/classes/CreateDocx.inc on line 3403 and on /phpdocx/classes/CreateDocx.inc on line 3404 The last thing we have to fix is repairing the unlink functions on lines 3350 and 3355

Posted by admin  · 17-06-2015 - 15:46

Hello, Phpdocx allows to set a custom temp folder in the phpdocxconfig.ini file: ; absolute path to the temp dir. If empty the default system tmp directory will be used temp_path = "" Please use this option to set it, there's no need to change the CreateDocx class. Regards.

Posted by lamalama  · 18-06-2015 - 10:43

Although we set the correct absolute path in the config file, we still had to apply this fix. We are working in a trial version, can this be the problem?

Posted by lamalama  · 18-06-2015 - 10:44

The path that we've set in the config file is used correctly in the first step of the process. If we insert an exit() function just before the copy() function there's a generated (not docx) file in the tmp folder, created by phpdocx.

Posted by admin  · 20-06-2015 - 07:49

Hello, All versions work the same with temp folders. As the trial package can't be debugged, after you purchase a licence please contact us and we'll check it on your server. Regards.

Posted by lamalama  · 29-06-2015 - 08:44

We bought the license and set the license key and domain in the config file. Still we get the watermarks in the generated Word files. Can you please assist, also with the original problem? Thanks!

Posted by lamalama  · 03-07-2015 - 11:57

Hello, Is somebody able to respond to this topic? Thanks!

Posted by admin  · 03-07-2015 - 12:01

Hello, You need to download a new package on MYPHPDOCX page after login, you can't use the same trial package. Please download the new package and try again. If you still have issues please write to contact[at]phpdocx.com directly. Regards.