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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lahore, Pakistan
    Posts
    150
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Upload photo module not runs online

    I have developed a little project in PHP. Actually there is a option in a project to upload photos. The project works run 100% well without any error. But when i upload a project to a server, and Add a new image, it displays a following error.


    Warning: copy(../../images/Shirt.jpg): failed to open stream: Permission denied in /home/rescueg/public_html/rescue/frontend/admin/addimages.php on line 16


    CAn anyone suggests me , is it a permission error, or i usees wrong slashes or what is this.

    Kindly help me in this regard.
    Eshban

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Location
    West Midlands, UK
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It could be that copy isn't allowed on your server, have you tried move_uploaded_file instead? It's difficult to say without knowing more information but it's simple enough to check if it's a permission problem, just chmod the relevant files/folders to 0777 and if you still get the error you can probably assume it's not a permission error.

  • #3
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lahore, Pakistan
    Posts
    150
    Thanks
    2
    Thanked 0 Times in 0 Posts

    what is chmod

    What Is Chmod????

  • #4
    Regular Coder
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    217
    Thanks
    0
    Thanked 1 Time in 1 Post
    chmod is were you set certain file permissions for a file or folder. so you will need to set it to allow for you to upload into that file.

    PHP Code:
    <?php
        chmod
    ("/somedir/somefile"0777);
    ?>


  •  

    Posting Permissions

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