Hi,
Mandriva Linux 2007.0, Apache 1.3.37, PHP 4.4.4, mod-perl 1.30.
Having just completed a server rebuild, (from distro binary RPMs - which
have previously worked OK), I find that I was unable to access ENV["TMPDIR"]
from php scripts when running under apache. Investigation showed that
ENV["TMPDIR"] contains "/root/tmp", so the result is hardly surprising.
I also note that ENV["ENV"] contains "/root/.bashrc", and ENV["USERNAME]
contains "root".
Inserting putenv( "TMPDIR=/tmp" ); into the script works round the problem,
but is hardly a neat fix.
Running php from the command line results in the correct environment for the
current user.
Apache is running as user apache(79), group webmaster(505), and _SERVER[...]
contains the expected values; _SERVER["TMPDIR"] contains /home/tony/tmp.
OK, so PHP thinks its root. How and where does this get set, and how do I
fix it?
Any answers will receive my undying gratitude.
--
Tony van der Hoff | mailto:tony@xxxxxxxxxxxxxx
Buckinghamshire, England
[Index of Archives]
[PHP Users]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[Postgresql]
[PHP Books]
[PHP Databases]
[PHP SOAP]