Can't upload files
Posted by: dede (---.mclink.it)
Date: July 13, 2007 04:29PM

Hello,

I already checked all messages in this forum about "upload problems" but still I didn't manage to solve my problem.

WAMP5 version: 1.6.6
PHP version: 5.2.0
Apache version: 2.0.59

I cannot upload files to the temp folder. I already checked every php.ini, settings are ok:

file_uploads = On
upload_tmp_dir = "c:/wamp/tmp"
upload_max_filesize = 2M

My OS is Microsoft Windows XP Home Edition.

I noticed that C:/wamp/tmp is flagged as "read-only". I tried using "attrib -r +s C:/wamp/tmp" but still it doesn't work. I got the same problem in another pc I used, with the same software/OS installed. Doesn't work. This is the code i'm using:

[www.hostingsolutions.it]

I tried with other codes as well, but problem is still that is_uploaded_file($_FILES['file1']['tmp_name']) ==FALSE!!! (or with other scripts $uploadedfile == "none" -> TRUE!)

I hope someone can help me, I already lost so many hours trying to figure it out by myself.

Options: ReplyQuote
Re: Can't upload files
Posted by: dede (---.mclink.it)
Date: July 13, 2007 11:44PM

Some news.. I continued with testing, and it seems it's everything ok with permissions. I ran this script:

<?php
$ourFileName = "C:\\wamp\\tmp\\testFile.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"winking smiley;
fclose($ourFileHandle);
?>

File was written correctly in that folder. So, I should have correct permissions.
So, what's the problem? Script should be ok (I tested so many, even simple, and actually my original one was working before installing WAMP - I used Apache/MySQL/Php manually installed. How about that $_POST ****, how comes it arrives with $uploadedfile = "none"?

Options: ReplyQuote
Re: Can't upload files
Posted by: dede (---.mclink.it)
Date: July 14, 2007 12:28AM

Sorry, I really was an idiot. I already wrote what was the problem, and I didn't even notice it.

"my original one was working before installing WAMP - I used Apache/MySQL/Php manually installed"

Yeah, before it had a different path for files. When I moved to WAMP, I changed about all path's BUT THAT ONE!!!! I'm really angry with myself. Solution was that easy, and I thought it was hard. Well, hope this will help some one (at least laughing grinning smiley). 1 day lost, but then problem was solved (lol).

Options: ReplyQuote


Sorry, only registered users may post in this forum.