Forum


Replies: 6   Views: 3031
Set temp_path from code
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 jhanley  · 30-10-2019 - 03:16

Thank you for your response.

Separate ini files is not practical, but your alternate suggestion is viable. I ordinarily don't like modifying third-party source files, but it's the best option at this point.

I made the change in PhpdocxUtilities.php as suggested. I can now modify the value of the temp_path setting in code during runtime, but this actaully revealed the crux of the problem. The temp_path isn't being recognized at all. The temporary file is actually getting created in the webroot. This works locally (where write permissions are not enforced), but fails remotely.

Even when hard-coding a temp_path setting in phpdocxconfig.ini, the temporary directory location is ignored and the file is created in the webroot.

Do you have any suggestions on how to get the temp_path to honor the value?

The document creation itself is working perfectly. I just can't get it working on production because of the aforementioned issue.

We have are using an Advanced licence in a Drupal 8 module with Acquia Cloud.