Hello!
We are running Apache with mod_php, installed from ports.
Some PHP applications are trying to write temporary files into a directory which should be specified by TMPDIR environment variable. When TMPDIR is not set, they fall back to /tmp or /var/tmp which in our case is outside PHP's open_basedir.
I would like to make them write to directory /var/tmp/php, but I can't figure out a clean way to specify TMPDIR for the case when Apache is started from the rc.d script. In the past I have written the TMPDIR setting directly into the /usr/local/etc/rc.d/apache22 script (which I don't particularly like), but now this script has become so complex I'm no longer sure how to even do this.
Any suggestions?
We are running Apache with mod_php, installed from ports.
Some PHP applications are trying to write temporary files into a directory which should be specified by TMPDIR environment variable. When TMPDIR is not set, they fall back to /tmp or /var/tmp which in our case is outside PHP's open_basedir.
I would like to make them write to directory /var/tmp/php, but I can't figure out a clean way to specify TMPDIR for the case when Apache is started from the rc.d script. In the past I have written the TMPDIR setting directly into the /usr/local/etc/rc.d/apache22 script (which I don't particularly like), but now this script has become so complex I'm no longer sure how to even do this.
Any suggestions?