1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php bug please help!

Discussion in 'PHP' started by princesuhaib, Oct 13, 2008.

  1. #1
    I got this bug, please help me fix it.


    Error:

    We're sorry, but an error has occurred in this page. Please access the Help page, or try again later.
    Error type: 2: move_uploaded_file(../images/quiz_63jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/thequiz/public_html/admin/quiz.php at line 179
    Error:

    We're sorry, but an error has occurred in this page. Please access the Help page, or try again later.
    Error type: 2: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpmsGKlX' to '../images/quiz_63jpg' in /home/thequiz/public_html/admin/quiz.php at line 179


    Here is line 179
    if (move_uploaded_file($_FILES["QuizFileName"]["tmp_name"], $uploadfile ))


    Any Help will be great!
    Thank You
     
    princesuhaib, Oct 13, 2008 IP
  2. commandos

    commandos Notable Member

    Messages:
    3,648
    Likes Received:
    329
    Best Answers:
    0
    Trophy Points:
    280
    #2

    failed to open stream: Permission denied
     
    commandos, Oct 13, 2008 IP
  3. hvalle98

    hvalle98 Well-Known Member

    Messages:
    460
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    135
    #3
    I think you have open_basedir turned on... check phpinfo
     
    hvalle98, Oct 13, 2008 IP
  4. princesuhaib

    princesuhaib Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what is it i need to fix than ?
     
    princesuhaib, Oct 13, 2008 IP
  5. jgarrison

    jgarrison Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You probably don't have write permissions on the directory the images are being moved to. You could try to CHMOD to 755 (or 777 if that doesn't work) and try the script.

    -Jim
     
    jgarrison, Oct 13, 2008 IP
  6. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #6
    Hire someone to fix it if you don't know how. It will save you time.

    This shouldn't cost more than ten bucks, post a request and you will get many replies.

    Peace,
     
    Barti1987, Oct 13, 2008 IP
  7. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #7
    chmod 777 for that directory
     
    javaongsan, Oct 13, 2008 IP