SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: upload error

  1. #1
    The Jellophonic Autobrain CHeeSeBLiND's Avatar
    Join Date
    Jul 2001
    Location
    Bolton, England
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    upload error

    ive been trying top sort out a script for uploading pics to a specific folder and i keep getting this error

    Warning: SAFE MODE Restriction in effect. The script whose uid is 269111 is not allowed to access /tmp/chairboard.jpg owned by uid 0

    anyone tell me whats going wrong?
    hmm...

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Safe mode is on. You can bypass this on f2s by using PHP in cgi mode by adding the following line to the top of your script:

    #!/usr/bin/php

    [EDIT]Some safe mode info here:
    http://www.php.net/manual/en/features.safe-mode.php

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    The Jellophonic Autobrain CHeeSeBLiND's Avatar
    Join Date
    Jul 2001
    Location
    Bolton, England
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do i put

    <?PHP
    #!/usr/bin/php ...

    or

    #!/usr/bin/php
    <?PHP ...
    hmm...

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The second one

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  5. #5
    The Jellophonic Autobrain CHeeSeBLiND's Avatar
    Join Date
    Jul 2001
    Location
    Bolton, England
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nope, doesnt work...

    im just getting the same problem but its displaying #!/usr/bin/php at the top of the page...
    hmm...

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry CHeeSeBLiND you have to name your file something.cgi not something.php

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  7. #7
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or you could try this method instead of copy()
    PHP Code:
    if(move_uploaded_file($uploadedfile$file_and_path)){
    echo 
    "Image uploaded successfully";
    } else {
    echo 
    "Copy failed!";

    My host had safe mode on and this worked fine.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  8. #8
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I meant to post a link to that thread Defender1. f2s does let you run srcipts in cgi mode specifically for things like this though

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


Bookmarks

Posting Permissions

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