Permission Denied after Image Upload

Discussion in 'PHP' started by koolsamule, Jun 17, 2010.

  1. #1
    Hi Chaps,

    I've got a image upload script that works on my Apache on IIS development server, but on the Apache Lunix live server, although the images are uploaded correctly and the MySQL database is updated correctly, I can't view the images.

    Viewing the HTML source, checking both the FTP files and the database values, all look OK.

    But the image doesn't show, just the white box with the red cross in the corner.

    If I try to copy the shortcut of the image and open it in a seperate window, I get the following:
    I'm not sure what to try next, it seems strange that the files/database/source look good but it just won't show!

    I've tried both $HTTP_POST_FILES and $_FILES to upload the images, but both have the same result.

    If anyone has any ideas, please help!
     
    koolsamule, Jun 17, 2010 IP
  2. tommykent1210

    tommykent1210 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What are the permissions on the image? CHMOD them to 777 if they are different.
     
    tommykent1210, Jun 17, 2010 IP
  3. koolsamule

    koolsamule Peon

    Messages:
    101
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do I have to change the permission of the folder and the file ?
     
    koolsamule, Jun 17, 2010 IP
  4. strgraphics

    strgraphics Active Member

    Messages:
    710
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    ya use this as your final line your loop

    chmod('image path', 777);
     
    strgraphics, Jun 17, 2010 IP
  5. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #5
    You need to change the permission of the Folder :)
     
    roopajyothi, Jun 17, 2010 IP
  6. HuggyEssex

    HuggyEssex Member

    Messages:
    297
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    45
    #6
    Just change the folder permissions, the files will inherit the same permissions unless you set it otherwise.
     
    HuggyEssex, Jun 17, 2010 IP