Results 1 to 7 of 7

Thread: php image upload problem at godaddy

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2009
    Posts
    4

    php image upload problem at godaddy

    recently ...i tried a image upload php script ...it works well at my local server...but when i tried same php script in my site www.gnomeworkings.com which is hosted at godaddy.....i couldnt upload images in the folder i specified...i have changed the access permissions of the files to which i gonna upload as wite and read ....event then i couldnt upload the image ...can some one please me to resolve this issue....its urgent!!!!!!!!!!!!!!!

    thanks in advance
    samvel
    Last edited by samvel2609; May 7th, 2009 at 02:51 PM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: php image upload problem at godaddy

    Moved From The CodeBank
    Quote Originally Posted by samvel2609
    but when i treid same php script in my php host account at godaddy.....i couldnt upload images in the folder i specified
    That doesn't tell me anything. WHY couldn't you upload the images?

    Have you reported this issue to the godaddy people?

  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: php image upload problem at godaddy

    I'm guessing your local machine is Windows and Godaddy was using a Unix web server. You need to make sure that you have write permissions on the folder you're looking to move files to (by chmodding the directory).

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2009
    Posts
    4

    Re: php image upload problem at godaddy

    yup sir...my local machine is windows....

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2009
    Posts
    4

    Re: php image upload problem at godaddy

    ya i changed the access permissions of the folder to which i gonna write to...as write and read

    the folder to which i gonna write is gallery_images

    i tried even ftp image upload...but i got failure message

    $title=addslashes($_POST['title']);

    $ftp_server = "ftp.anysite.com";
    $ftp_user = "******";
    $ftp_pass = "******";

    // set up a connection or die
    $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");

    // try to login
    if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
    echo "Connected as $ftp_user@$ftp_server\n";
    } else {
    echo "Couldn't connect as $ftp_user\n";
    }

    // close the connection
    ftp_close($conn_id);



    $path = 'ftp.anysite.com/gallery_images/';


    if(isset($_FILES['file']) && is_uploaded_file($_FILES['file']['tmp_name']))
    {
    $filename = $_FILES['file']['tmp_name'];
    $destination = $path . $_FILES['file']['name'];
    if (file_exists($destination))
    { echo 'File already exists!<br />'; }
    else
    if(move_uploaded_file($filename,$destination))
    { echo 'File uploaded!<br />';
    $temp5="gallery_images/". $_FILES['file']['name'];
    }
    else
    { echo ' ** Failure! ** <br />';
    }

    }

    yup..i talked to godaddy....they asked me to change the access permissions for the folder..even then i get the same failure error message

    ya i could make the ftp connection..only problem is imageupload

    has anyone tried out to upload images thru php ....to their site @ godaddy???

    please do reply me... i m screwed up here


    samvel

  6. #6
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: php image upload problem at godaddy

    if you can't even upload pictures via ftp then it's not a problem with your script. you'll have to talk to your host about it all.

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2009
    Posts
    4

    Re: php image upload problem at godaddy

    The response they gave is no way related to the question i asked.....they are just bluffing some thing...i mreally helpless rite now

Posting Permissions

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



Click Here to Expand Forum to Full Width