Forum


Replies: 3   Views: 4157
Blank or corrupted word documents on new server
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 OGTadmin  · 17-10-2012 - 20:19


I have been trying to setup the 2.5.1 Pro version on a Windows Server with IIS 6.0. When running the examples, they either produce blank Word documents or corrupted Word documents. My custom code produces a blank Word document. (Note that the free version of PHODOCX seems to run fine on this server.)

From the forums, it appears this can occur when there are permission problems with PHP or the Network Services. As a developer, I am not an expert on these configurations, but hopefully somebody can provide more specific information to help me solve the problem, or allow me to communicate the required changes to our server administrator.

I ran check.php here is the output:

Your PHP version is 5.3.17 => OK
Your Zip extension version is 1.11.0 => OK
Your XSL extension version is 0.1 => OK
Your Tidy extension version is 2.0 => OK

Here is the php error log output when running the List.php example:

17-Oct-2012 19:43:01 UTC] PHP Notice: Trying to get property of non-object in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 1061
[17-Oct-2012 19:43:01 UTC] PHP Notice: Undefined variable: newName in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 5884
[17-Oct-2012 19:43:01 UTC] PHP Warning: scandir(C:\WINDOWS\TEMP/1507f0a4594f55,C:\WINDOWS\TEMP/1507f0a4594f55): Access is denied. (code: 5) in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 5885
[17-Oct-2012 19:43:01 UTC] PHP Warning: scandir(C:\WINDOWS\TEMP/1507f0a4594f55): failed to open dir: No such file or directory in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 5885
[17-Oct-2012 19:43:01 UTC] PHP Warning: scandir(): (errno 2): No such file or directory in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 5885
[17-Oct-2012 19:43:01 UTC] PHP Warning: Invalid argument supplied for foreach() in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 5886
[17-Oct-2012 19:43:01 UTC] PHP Warning: copy(../docx/example_list.docx): failed to open stream: No such file or directory in E:\Inetpub\wwwroot\XGT\webappsdev\ogt\cop\phpdocx\v2.5.1\classes\CreateDocx.inc on line 4162