« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: file(assets/cache/docid_51.pageCache.php) [function.file]: failed to open stream: Permission denied
Error type/ Nr.: Warning - 2
File: /mnt/local/home/thatguysocrates/DOMAIN.com/manager/includes/document.parser.class.inc.php
Line: 370
Line 370 source: $flContent= implode("", file($cacheFile));
Parser timing
MySQL: 0.0156 s (0 Requests)
PHP: 0.0284 s
Total: 0.0440 s
As far as the sessions, you’re on a standard webserver with local
storage, so I’m not sure why you’d be seeing issues. We used to actually
mount customer storage over NFS, but we’ve phased that out...so there
shouldn’t be any weirdness there. I would suggest contacting the
developer and asking what might cause the software to write files with
those permissions. We’ll be happy to share any info about our server
configuration.
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: file(assets/cache/docid_334.pageCache.php) [function.file]: failed to open stream: Permission denied
Error type/ Nr.: Warning - 2
File: /home/httpd/vhosts/websee.ru/subdomains/franke/httpdocs/manager/includes/document.parser.class.inc.php
Line: 368
Line 368 source: $flContent= implode("", file($cacheFile));
Parser timing
MySQL: 0.0067 s (0 Requests)
PHP: 0.0365 s
Total: 0.0432 s
It’s one year now. But then i managed to solve problem by little hacking..function postProcess() {
// if the current document was generated, cache it!
if ($this->documentGenerated == 1 && $this->documentObject[’cacheable’] == 1 && $this->documentObject[’type’] == ’document’ && $this->documentObject[’published’] == 1) {
$basepath= $this->config["base_path"] . "assets/cache";
// invoke OnBeforeSaveWebPageCache event
$this->invokeEvent("OnBeforeSaveWebPageCache");
if ($fp= @ fopen($basepath . "/docid_" . $this->documentIdentifier . ".pageCache.php", "w")) {
// get and store document groups inside document object. Document groups will be used to check security on cache pages
$sql= "SELECT document_group FROM " . $this->getFullTableName("document_groups") . " WHERE document=’" . $this->documentIdentifier . "’";
$docGroups= $this->db->getColumn("document_group", $sql);
// Attach Document Groups and Scripts
if (is_array($docGroups)) $this->documentObject[’__MODxDocGroups__’] = implode(",", $docGroups);
$docObjSerial= serialize($this->documentObject);
$cacheContent= $docObjSerial . "<!--__MODxCacheSpliter__-->" . $this->documentContent;
fputs($fp, "<?php die(’Unauthorized access.’); ?>$cacheContent");
fclose($fp);
}
}
// Useful for example to external page counters/stats packages
if ($this->config[’track_visitors’] == 1) {
$this->invokeEvent(’OnWebPageComplete’);
}
// end post processing
}
function postProcess() {
// if the current document was generated, cache it!
if ($this->documentGenerated == 1 && $this->documentObject[’cacheable’] == 1 && $this->documentObject[’type’] == ’document’ && $this->documentObject[’published’] == 1) {
$basepath= $this->config["base_path"] . "assets/cache";
// invoke OnBeforeSaveWebPageCache event
$this->invokeEvent("OnBeforeSaveWebPageCache");
// get and store document groups inside document object. Document groups will be used to check security on cache pages
$sql= "SELECT document_group FROM " . $this->getFullTableName("document_groups") . " WHERE document=’" . $this->documentIdentifier . "’";
$docGroups= $this->db->getColumn("document_group", $sql);
// Attach Document Groups and Scripts
if (is_array($docGroups)) $this->documentObject[’__MODxDocGroups__’] = implode(",", $docGroups);
$docObjSerial= serialize($this->documentObject);
$cacheContent= $docObjSerial . "<!--__MODxCacheSpliter__-->" . $this->documentContent;
file_put_contents($basepath . "/docid_" . $this->documentIdentifier . ".pageCache.php", "<?php die(’Unauthorized access.’); ?>" . $cacheContent);
if(!is_readable($basepath . "/docid_" . $this->documentIdentifier . ".pageCache.php"))
unlink($basepath . "/docid_" . $this->documentIdentifier . ".pageCache.php");
}
// Useful for example to external page counters/stats packages
if ($this->config[’track_visitors’] == 1) {
$this->invokeEvent(’OnWebPageComplete’);
}
// end post processing
}