Re: File upload problems using Apache 1.3 on Debian stable

From: Date: Mon, 13 Dec 2004 10:37:26 +0000
Subject: Re: File upload problems using Apache 1.3 on Debian stable
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-204147@lists.php.net to get a copy of this message
Hi, I do indeed have the file upload code inside a class function. it's one of those little things about PHP hadn't fully realised yet. Thanks for the pointer! If I pass the relevant _FILE entry to that function and work off that it solves the problem right? Cheers, Tom Richard Lynch wrote:
coding@digital-data.co.uk wrote:
Hi, I have been having problems trying to get file uploads working with PHP in a Debian Linux enviroment. I have ensured that both the temporary directory PHP uploads use has the appropriate permissions set, as well as the folder I am attempting to copy the images into. When I called phpinfo() from the page that the upload script is on it shows the contents of the _FILE array as containing the appropriate details, however when I try and access them from within my actual code, the variables appear to be unset, and no files appear in either the temporary folder or the folder I am trying to copy the file to. Anyone have any suggestions?
Did you wrap your code up in a nice function? Perhaps you need: global $_FILES; inside that function. Or not. Still haven't worked out which $_XXX are super-global or not in which versions. Maybe someday.
-- Working on webhosting Tel:01388 777711 MTA handling, PHP Web:www.digital-data.co.uk scripting, and wireless Email:tom@digital-data.co.uk networking, just for a change.

« previous php.general (#204147) next »