Click to See Complete Forum and Search --> : php image upload problem at godaddy
samvel2609
May 7th, 2009, 11:49 AM
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
Hack
May 7th, 2009, 11:53 AM
Moved From The CodeBankbut when i treid same php script in my php host account at godaddy.....i couldnt upload images in the folder i specifiedThat doesn't tell me anything. WHY couldn't you upload the images?
Have you reported this issue to the godaddy people?
kows
May 7th, 2009, 01:27 PM
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).
samvel2609
May 7th, 2009, 02:45 PM
yup sir...my local machine is windows....
samvel2609
May 7th, 2009, 02:46 PM
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
kows
May 7th, 2009, 08:43 PM
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.
samvel2609
May 7th, 2009, 10:48 PM
The response they gave is no way related to the question i asked.....they are just bluffing some thing...i mreally helpless rite now
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.