21288 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 838 Views |
-
StaticExporter still working?

13 January 2011 at 1:27am
Hi,
I tried to use StaticExporter to export several Silverstripe sites. I tried pages based on 2.4.0, 2.4.2 and 2.4.3. They all just return empty "mysite.tar.gz" files when I call http://domain.tld/StaticExporter/export. Is there anything I'm missing, or does Static Exporter not work in 2.4?
Thanks
Johannes -
Re: StaticExporter still working?

15 January 2011 at 3:00am
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/exportLine 93 in /var/www/cms/code/StaticExporter.php
Source84
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 folderTrace
* 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.phpAny idea?
Thanks
Johannes
| 838 Views | ||
|
Page:
1
|
Go to Top |

