axelhahn/pimped-apache-status

Error when creating and updating 'checkupdate_*.tmp' file

damianperera opened this issue · 4 comments

PHP throws an error when creating and updating the checkupdate_*.tmp file. This happens since the inc_functions.php file is attempting to R/W this file in the systems default tmp folder (usually /tmp/) which is not accessible to PHP in hosts with safe_mode and open_basedir enabled.

Thanks for this advice wih save_mode and open_basedir option!
The update via web frontend is not ready in version 2 (which is still beta).
I will put it to version 1.x too.

@damianperera I was a bit fast. While testing I saw that webroot / approot itself is not a good idea. I will add a subdir i.e. "tmp" and define that [approot]/tmp must be writable. The idea behind is: if I use Puppet/ Chef/ ... and I install the tool as root then all files can be non writable for the webservice ... excluding specific, named folders. So far in version 1.x only the ./config/ directory must be writable: https://www.axel-hahn.de/docs/apachestatus/get_started.htm#Permissions; in version 2 below ./vendor/ too. Just wanna say that I will make a small change after the merge :-)

@axelhahn sounds good, adding a subdir within the document root would definitely be better than using the system's tmp folder or the document root 👍

@damianperera I added a config variable "tmpdir". It has the default "tmp" that points to [approot]/tmp. In the user config it is allowed to override it or use system temp dir. This seems to be the variant with the most control. The temp directroy is used for the version check (where you detected it) and in the updater.
Version 1.x + documentation was updated too.