cmgmyr Posted March 24, 2006 Share Posted March 24, 2006 This is my uploader.php code:[code]global $userid; if($file_name !="") { copy ("$file", "custphotos/gallery".$userid."/$file_name") or die ("Could not copy file"); }else{ die("No file specified"); }[/code]This is the error that I'm getting:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: copy(): SAFE MODE Restriction in effect. The script whose uid/gid is 8082/8082 is not allowed to access /mounted-storage/home11/sub002/sc17123-RPXM/www/htdocs/memorial/custphotos/gallery2 owned by uid/gid 99/99 in /mounted-storage/home11/sub002/sc17123-RPXM/www/htdocs/memorial/uploader.php on line 5Warning: copy(custphotos/gallery2/example.jpg): failed to open stream: No such file or directory in /mounted-storage/home11/sub002/sc17123-RPXM/www/htdocs/memorial/uploader.php on line 5Could not copy file[/quote](Line 5 is the copy command)The directories are chmod 777.What is going on and how can I fix this?Thanks Quote Link to comment Share on other sites More sharing options...
lpxxfaintxx Posted March 24, 2006 Share Posted March 24, 2006 I'm not sure, but maybe your server restricts file uploading? Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted March 24, 2006 Share Posted March 24, 2006 [!--quoteo(post=358036:date=Mar 24 2006, 08:14 PM:name=lpxxfaintxx)--][div class=\'quotetop\']QUOTE(lpxxfaintxx @ Mar 24 2006, 08:14 PM) [snapback]358036[/snapback][/div][div class=\'quotemain\'][!--quotec--]I'm not sure, but maybe your server restricts file uploading?[/quote]i've not yet used or looked at 'copy', but have you looked at move_uploaded_file? if it's a conventional upload script via a form, then a conventional method of dealing with it may help. Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted March 27, 2006 Author Share Posted March 27, 2006 I figured it out...On my server there is a safe mode where I guess it doesn't let you copy files. I just disabled this function and everything works now.Thanks,-Chris Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.