AnsweredAssumed Answered

Quercus file functions don't work

Question asked by strophi on Mar 17, 2009
Hi Forums,

I want to create create a php script that injects data (version nr. approve date) into a docx file sitting in the repository…

In my script i fetch the content of an docx-File, write it to a temp file with file_put_contents, unzip it, change some placeholders in header.xml and footer.xml  via DomDocument, and zip it again, and update the docx-File in the repository.

Now I changed it to run under quercus (as rule: execute a script…) and it seems that file functions like mkdir, file_put_contents don't work…

if (!mkdir($this->strTempDir, 0777))
   die ("Temp-Verzeichnis ".$this->strTempDir.' @ -'. realpath(dirname(getcwd())).'- @ -'.system("whoami")."*- konnte nicht angelegt werden.");

the realpath-Statement returns '.', getcwd() returns 'stream', and the whoami return 'root', because root started alfresco.

What is my mistake, any help/hints are appreciated,