Replies: 2   Views: 1473
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 admin  · 31-03-2017 - 06:45


The DOCXStructure class is used by all samples and any file created by phpdocx, so if other scripts work then the problem may come from other source. The addChart method uses the default temp dir to create a chart temp file, maybe it can't write to this folder.

Please try to run the included sample examples/Core/addChart/sample_1.php using PHP CLI mode:

$ php sample_1.php

phpdocx uses tempnam to get the temp folder when using addChart, if you echo this PHP function:

echo tempnam('', 'chart');

you can get the default temp folder to check if you have rw access.

We also see you have written other topics in the forum about charts and you were able to create them. Have you changed anything in the server configuration?, or have you moved the library to other server?, maybe the server logs can help to explain this issue.