php help on script

Discussion in 'PHP' started by EliasJabb, Nov 25, 2007.

  1. #1
    I need some php help on script like im not sure if php effects it but i just someone to code my site www.customupload.com everythign is workin except when u upload something u get the url put past the url in the address bar and i get this:

    "Forbidden
    You don't have permission to access /uploads//16f6e6d9766b47be567b41587d19cd38jpg on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    --------------------------------------------------------------------------------

    Apache/1.3.37 Server at customupload.com Port 80"

    Help is need thanx i have a account in dp like with 600 post but :S this is like my first time on dp for 3 months forgot the pass :p
     
    EliasJabb, Nov 25, 2007 IP
  2. mvl

    mvl Peon

    Messages:
    147
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check file permissions on the /upload/ directory
     
    mvl, Nov 25, 2007 IP
  3. EliasJabb

    EliasJabb Well-Known Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    i did its all 777 should work :S and weird thing all uploaded files are in the upload folders
     
    EliasJabb, Nov 25, 2007 IP
  4. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #4
    Where is the upload directory located? If it is a directory under the main directory the correct call would be to
    uploads//16f6e6d9766b47be567b41587d19cd38jpg on this server.

    The first / may be causing the problem. Also you have a double // after the word uploads. Generally this causes no problems but it can.

    edit: Also there is no period before the jpg. Maybe that is a typo only?
     
    Colbyt, Nov 25, 2007 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    The directory path is wrong. It should be something like:

    /home/username/domains/domain.com/public_html/uploads

    Peace,
     
    Barti1987, Nov 25, 2007 IP
  6. EntertainmentScripts

    EntertainmentScripts Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It may also be a problem with the way in which your server sets the CHMOD of the file upon being uploaded via PHP. Make sure the uploaded file receives a CHMOD of either 644, 755 or 777. You can test this by first CHMOD'ing the file via FTP, then checking whether it can be viewed in the browser.
     
    EntertainmentScripts, Nov 25, 2007 IP