Replies: 3   Views: 1218
Error while trying to write ... please check write access.
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 irishadar  · 04-05-2017 - 19:29

Edited by irishadar · 05-05-2017 - 11:52


I have upgraded to 7.0 version and i started to get this error "" , but the document is created on server. 

the line invoking the error is :


the error coms  from class "" (line 144) , as if it is testing for its readability  befor it gets created or at the same time.

 the same code is working fine on version 6.5.

if i use local folder instead of network one it is working fine as well.


what am i missing ?

how can i fix this ?


Posted by admin  · 05-05-2017 - 06:34


The file included in phpdocx 7 is the same than phpdocx 6.5. It just add a new option to return the structure of the class instead of creating the DOCX file, but the lines you refer in this file:

if (!is_writable($path) || !is_readable($path)) {
   die('Error while trying to write to ' . $path . ' please check write access.');

are the same in both phpdocx 7 and phpdocx 6.5.

We recommend you to check if the server is returning a wrong false. For example if you are using Samba you need to configure it correctly:

Anyway, as all payment licenses of phpdocx are open source (not free source; so you can change the code but not redistribute it), you could remove that lines from That lines only check if the file can be written correctly, but you can comment or remove them.


Posted by irishadar  · 05-05-2017 - 12:00


Thanks for your prompt answer. I am using php ver 7.1 though, but i still getting the error , so i think i will take your advice and comment out these lines.


thanks again,

iris hadar

Posted by admin  · 05-05-2017 - 14:49


phpdocx is fully tested and compatible with PHP 5.2, 5.3, 5.4, 5.5, 5.6, 7.0 and 7.1 We think the problem is some wrong configuration in the network service.

Anyway, you can remove that lines to avoid the file checking.