php question
David P. Schwartz
davids@desertigloo.com
Mon, 15 Jan 2001 03:12:10 -0700
I've got a strange thing with PHP. Thought I'd ask here first to see if
anybody might have seen it.
I'm trying to implement a simple example of a script that allows a file to be
uploaded.
I put an <INPUT TYPE="file" NAME="myfile" ENCTYPE="multipart/form-data"> tag
on the form, along with a submit button. (yeah, the rest of the HTML is
fine...)
The script gets the file, uploads it, and the $myfile variable says the
uploaded file is named something like "/var/tmp/phpq32345". However, I don't
have write permissions to /var/tmp.
I created a php3.ini file in the same directory that contains the script that
contains only the line:
upload_tmp_dir = myuploads
However, the script never sees it. I printed out the cwd from the script, and
it IS the same dir where the php3.ini file resides.
I tried setting $PHPRC inside the script, but that doesn't work. I'm not sure
how to inject PHPRC into the php script environment, because the scripts run
as user "nobody".
I can't figure out how to override the default location. Any suggestions?
FYI: this is running on PHP 3.0.14, Apache 1.3.12 on a FreeBSD 4.0 platform.
TIA!
-David Schwartz