Image Uploading Not Working

TO EVERYONE THAT HELPED…

I’m doing this in a separate reply coz I can.

I’m not exactly shoor how I fixed this but it is working. (please reply if you know the solution)

I went through some other posts and one of them mentioned settings in my PhP config itself.
the latest PhP upload settings are by default…

[code];;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20[/code]

So I changed it to…

[code];;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
upload_tmp_dir = D:/Web/temp

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2048MB

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20[/code]

I first changed the “upload_max_filesize” to 1024MB
Did not work.
Then to 2048MB
Same result.
Now here is what I think did the trick…
I then specify the “upload_tmp_dir” and it is uploading now.

My page code just for reference…

[code]

Shop Database Image Chooser <?php

error_reporting(E_ALL);
ini_set(‘display_errors’, 1);

if ((isset($_POST[“send”])) && ($_POST[“send”] == “form1”)) {
$file_Name = $_FILES[‘userfile’][‘name’];
move_uploaded_file($_FILES[‘userfile’][‘tmp_name’], “…/shop_images/products/”.$file_Name);
?>

<?php } else {?>

<?php }?> [/code]

Once again…
THANK YOU ALL FOR HELPING ME

(im not a flamer, but stackoverflow.com did not even reply to this same problim.)

Congrats on the solution. It appears it was a combination of many things that you fixed thru the entire
thread. Glad to hear it is working for you now.

One note, I never thought of the size limits because usually you test with a small upload to save time. Never
thought of limits on that part as the code needed help, too. Glad you found that one! We will mark this one
solved… Nice!

This is the issue when I assume the initial setup is correct. I have never set the upload_tmp_dir directive and never had an issue, and I have setup lots of web servers.

Sponsor our Newsletter | Privacy Policy | Terms of Service