NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page image upload failure

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 11-17-2004, 02:34 AM THREAD STARTER               #1 (permalink)
NamePros Expert
 
redhippo's Avatar
Join Date: Oct 2003
Location: ANForum
Posts: 5,218
redhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to behold
 



Sad image upload failure


whats the problem?? can anyone tell me??

Warning: move_uploaded_file(/home/kaxking/public_html/userimages/): failed to open stream: Is a directory in /home/kadking/public_html/admin/graphics_images.php on line 42

Warning: move_uploaded_file(): Unable to move '/tmp/phpP18fzK' to '/home/kaxking/public_html/userimages/' in /home/kaxking/public_html/admin/graphics_images.php on line 42
Discover_miles.bmp did not upload!
__________________
|www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts
FREE VB Skins
redhippo is offline  
Old 11-17-2004, 06:47 AM   #2 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
looking at those errors the files are not uploading because your not specifiying the file to to upload to, your trying to turn a folder into a file

say youve got the file color.gif
and you want to upload to /home/account/www/images

when you upload the file the contents of the file gets uploaded into a php tmp file to wherever and then you have to copy/move the uploaded file to a new folder and file name

so you need to make a not of the filename in your script and then on your function you need to add the file name so say color.gif was in a vairable called $file

you need to add onto the end of the path $file
????: NamePros.com http://www.namepros.com/programming/55843-image-upload-failure.html
so for example
/home/account/www/images/$file

then it should copy the file into color.gif

php doesnt actually copy the file it copys the contents of the file

well thats how i understand it
adam_uk is offline  
Old 11-18-2004, 02:29 AM THREAD STARTER               #3 (permalink)
NamePros Expert
 
redhippo's Avatar
Join Date: Oct 2003
Location: ANForum
Posts: 5,218
redhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to behold
 




i sort of understand most of it accept this.
Originally Posted by adam_uk
then it should copy the file into color.gif
????: NamePros.com http://www.namepros.com/showthread.php?t=55843
actually what I did was to use the browse and upload function within the admin panel to do the loading.
and it gives the error message!
no idea of PHP!
__________________
|www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts
FREE VB Skins
redhippo is offline  
Old 11-18-2004, 03:49 AM   #4 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
basically when you upload a file it makes a note of the size file name and tmp name that its given, the script will then read the contents of the file (it doesnt actually copy the file) and then when its uploaded it places the contents into a tmp file when its uploaded the script will then make and empty file called the file name you uploaded it then writes the contents of the tmp file to the new empty file. so the empty file gets the contents of the file you just uploaded so it appears as an exact copy

so with that script your not actually specifiying the file you want to write to its set as a directory.
adam_uk is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:11 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger