Jump to content

Image Uploading Problem


cmgmyr

Recommended Posts

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 5

Warning: 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 5
Could 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
Link to comment
Share on other sites

[!--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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.