Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Malaysia
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with upload script

    Hi, I want to create a page which allows users to upload their photos to my server. So I used the following function: copy($photo,$uploaddir) where my $uploaddir looks something like /home/mydomain/mainwebsite_html/photos/

    Now a message appears:
    Warning: SAFE MODE Restriction in effect. The script whose uid is 558 is not allowed to access /home owned by uid 0 in /home/virtual/site56/fst/var/www/html/reg_form.php on line 38

    I have already "CHMOD" the script and directory to 777, but still the same message appears. Can you advise me on how to correct this?

  • #2
    Registered User
    Join Date
    Feb 2003
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    move uploaded file

    Hey

    A note on the COPY function on php.net: ## move_uploaded_file Bypasses safe mode and base_dir securities (the function is totally safe, no danger) ##

    Here is the function reference:
    http://www.php.net/manual/en/functio...oaded-file.php

    Note: move_uploaded_file() is not affected by the normal safe mode UID-restrictions. This is not unsafe because move_uploaded_file() only operates on files uploaded via PHP.

    Hope it helps

    Jesh


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •