Ok, little update.
My first problem was, that shell_exec was disabled in the php.ini.
The exporter starts working now, but fails at the end before packing and sending the file to the browser. If I check in the silverstripe-cache dir, the export is there...
[Warning] copy(/var/www/silverstripe-cache/static-export/mysite/home/index.html): failed to open stream: No such file or directory
GET /StaticExporter/export
Line 93 in /var/www/cms/code/StaticExporter.php
Source
84
85 // Write to file
86 if($fh = fopen($contentfile, 'w')) {
87 fwrite($fh, $response->getBody());
88 fclose($fh);
89 }
90 }
91
92 // copy homepage (URLSegment: "home") to webroot
93 copy("$tmpFolder/home/index.html", "$tmpFolder/index.html");
94
95 // archive all generated files
96 `cd $tmpBaseFolder; tar -czhf $baseFolderName.tar.gz $baseFolderName`;
97 $archiveContent = file_get_contents("$tmpBaseFolder/$baseFolderName.tar.gz");
98
99 // remove temporary files and folder
Trace
* copy(/var/www/silverstripe-cache/static-export/mysite/home/index.html,/var/www/silverstripe-cache/static-export/mysite/index.html)
Line 93 of StaticExporter.php
* StaticExporter->export(SS_HTTPRequest)
Line 193 of Controller.php
* Controller->handleAction(SS_HTTPRequest)
Line 137 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
* Director::direct(/StaticExporter/export)
Line 127 of main.php
Any idea?
Thanks
Johannes