Replies: 2   Views: 1407
Issue with addchart examples of phpdocx
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 andrzej.morun  · 30-03-2017 - 22:44

Any example with addchart give error:

Error while trying to write to .docx please check write access.

http:// (...) /phpdocx/examples/Core/addChart/sample_1.php

Failure to create temporary file: Permission denied in /home/(...)/phpdocx/classes/ on line 136

Looking for code od I think that problem is $path is empty.

This code add '.docx' which is displayed in error.       

// check if the path has as extension
        if(substr($path, -5) !== '.docx') {
            $path .= '.docx';


What maybe wrong? What can I do? Others method of phpdocx works. I can read temaplete. Replace text variable. But I I want to add chart this causes exception.

I have checked any different configuration of temp_path. Leave empty, set "/tmp/". Any option didn't resolve problem.