Re: Problem with file copy after uploading

From: Date: Wed, 06 Sep 2000 02:32:18 +0000
Subject: Re: Problem with file copy after uploading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-15422@lists.php.net to get a copy of this message
On 5 Sep, Rick Yin wrote: > When a file is uploaded to the remote server, I got the the following > error code: > > Warning: SAFE MODE Restriction in effect. The script whose uid is 12073 > is not allowed to access /tmp/phpWjS20i > owned by uid 0 in /free/home/greenfield/phtest/do_upload.php on line 6 > Couldn't copy the file! > > Here's my do_upload.php file: > <? > if ($img1_name != "") { > // comment > // > // comment > copy("$img1", "/free/home/greenfield/phtest/$img1_name") //line 6 > or die("Couldn't copy the file!"); > } else { > die("No input file specified"); > } > ?> > > When I run "<? phpinfo() ?>", the upload_tmp_dir is "None" for both > master value and local value. The server run php3.0.12 and linux. What > could be wrong? please show me some working code 'cause i'm dummy. Have a look at the Configuration section of the manual; you may be able to change the safe mode and upload_tmp_dir settings via the php3.ini file, if you have access to it, apache conf or via .htaccess file. If PHP is running as a cgi, and you can't modify the ini file, you're possibly out of luck and you may have to negotiate with your provider. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#15422) next »