I'm am completely stumped. I'm trying to upload a simple photo via HTTPS. I've done this countless times, but this one time it's not working.
Here's the situation. I'm using a very simple yet robust file upload script, simple input=file, etc. and submit button to upload using POST, from there PHP takes over and does the rest. Once over on the php side I went through some problem solving/debugging and noticed that the file name was a bunch of goop... uploads/1.��8D��J��Q��9. certainly not the file i choose.
I'm not sure if this is a problem with the SSL, HTML5, or PHP. All other data passed through ends up very readable in the DB.
I've noticed something new in the file upload box of c:\fakepath, i've used HTML5 for the past several months and haven't seen this, looked it up and saw it's an HTML5 security feature. dont know if that's causing the problem or not?
Ok so I've verified with a friend (incase I was going crazy) that the HTML and PHP is fine.
I have even broken it down and went super simple with still no luck...
$uploaddir = 'uploads/';
$uploadfile = $uploaddir . basename($_FILES['photo']['name']);
$filename = $_FILES['photo']['name'];
if (move_uploaded_file($_FILES['photo']['tmp_name'], $uploadfile)) {
echo "Alls good.";
}
Also on the HTML page I am using the jquery plugin "niceforms" I have turned this off to rule it out, and still does not work.
Thank you.