heatmap write access

This commit is contained in:
Per Qvarforth 2022-08-02 16:00:46 +00:00
parent 1340938985
commit f7142c031e
2 changed files with 8 additions and 4 deletions

View File

@ -206,9 +206,10 @@ sudo a2enmod rewrite
sudo systemctl restart apache2
```
For the symbols cache to work we need to make sure the webserver has write access to our htdocs/public/symbols directory (the following permission may be a little bit too generous...)
For the symbols and heatmap caches to work we need to make sure the webserver has write access (the following permission may be a little bit too generous...)
```
chmod 777 ~/trackdirect/htdocs/public/symbols
chmod 777 ~/trackdirect/htdocs/public/heatmaps
```
If you have enabled a firewall, make sure port 80 is open.

View File

@ -77,7 +77,10 @@ $config = array(
);
$heatmap = new gd_heatmap($data, $config);
//$heatmap->output();
$heatmap->output($filename);
readfile($filename);
if (is_writable(dirname($filename))) {
$heatmap->output($filename);
readfile($filename);
} else {
$heatmap->output();
}