Topic awaiting preservation: PHP file uploads issue... |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 04-22-2003 17:44
Ok, I have a simple little upload script I wanted to use. Unfortunately, the files are uploading themselves into my C:\WINDOWS directory. I am wondering if this has something to do with how I configured php.ini, but it seems everything is in place. My temp upload dir is NOT C:\WINDOWS, and even then, the script should be putting it somewhere else anyway. Is there something that I am missing here? I am running Apache, PHP 4.2.2, MySQL on WinXP. |
Paranoid (IV) Inmate From: Sthlm, Sweden |
posted 04-22-2003 20:51
What I usually do is let the file land wherever the setup takes it, then I use "copy ( string source, string dest)" or "move_uploaded_file ( string filename, string destination)" to wherever I want it to be placed. This has worked just fine and dandy on both win & linux installations. |
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 04-22-2003 23:10
That's a good idear DmS. Thanks! I take it there is no workaround in configuring PHP or Apache then? |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 04-22-2003 23:56
I think you should show us your script. I would definately not want anything having the ability to upload into my windows directory. That is a sure fire way to make sure your system gets hacked to bloody hell and back. |
Paranoid (IV) Inmate From: Sthlm, Sweden |
posted 04-23-2003 10:02
Perhaps I should have added that my windows install is strictly development only, no outside access... And Yes! In a production/live enviroment the paths MUST be set correctly. |
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 04-23-2003 18:34
Silly me...I was not using an absolute path. Everything seems to work now...I think it will take some time to get used to working with a server. Thank you for the help guys. |
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 04-23-2003 18:37
Here is the code anyways: code: <FORM ENCTYPE="multipart/form-data" ACTION="imageupload.php" METHOD="POST">
|