PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 24th, 1999, 03:45 AM
Thistle
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hello !
I've built a form for uploading a user file, it works for sure, and PHP3 is even telling the name of temporary file in specified directory - BUT there's no such file there! And I can't find it any where in the system. I'm using Apache 1.3 on Linux RH 6.0 Hedwig. So what could be a problem - please tell me.
Thank you a priori!
Yours,
Thistle


------------------
Sincerely yours,
=Thistle=

Reply With Quote
  #2  
Old December 27th, 1999, 11:25 PM
Randy
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Did you check the file upload location on the server to make sure the web server has permission to write to the directory?

Also, wouldn't this message be more appropriate for the PHP forum? This is the Perl forum.



[This message has been edited by Randy (edited 12-27-99).]

Reply With Quote
  #3  
Old December 28th, 1999, 07:58 AM
Tricord
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Best is to move your file in a non-temp location after it's been uploaded... Something like with the following code...

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>if (!file_exists( "/destination_directory/$filename")) {
copy($file, "/destination_directory/$filename");
} else {
echo( "I'm sorry but your file name is already in use, please try another.");
unlink($file); //deletes the temp file if it cannot be copied to destination
exit;
}
unlink($file); //deletes the temp file after a succesfull copy to the destination
if (!file_exists( "/destination_directory/$filename")) {
echo( "Sorry but your file did not upload for some reason, please try again."); //makes sure the file is actually there...
exit;
}[/quote]

I hope this helps!

-Tricord
BELGIUM
URL

[This message has been edited by Tricord (edited 12-28-99).]

Reply With Quote
  #4  
Old January 7th, 2000, 03:06 AM
Thistle Thistle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Ekaterinburg, Ural, Russia
Posts: 10 Thistle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Thistle
THANK YOU, RANDY AND TRICORD!
THAT REALLY HELPED!
Good Luck!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > HELP, PLEASE! UPLOAD WITH PHP3 - Got a problem here.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT