/    Sign up×
Community /Pin to ProfileBookmark

$_FILES array missing type,tmp name, size – error 6

I have a script that uploads a jpg from a form. PHP handles the form

The image is stored in a folder and I have permissions

the script works great on my old computer (xp-pro) and on the apache server

the script does not work in new computer / new PHP install / Vista OS

This is what displays from the local server / vista / IIS7
debugging info:Array ( [img1] => Array ( [name] => Desert Landscape.jpg [type] => [tmp_name] => [error] => 6 [size] => 0 ) )

This is the correct display from the Apache server
debugging info:
Array ( [img1] => Array ( [name] => Autumn Leaves.jpg [type] => image/pjpeg [tmp_name] => /tmp/php6nXuLM [error] => 0 [size] => 276216 ) )

I am missing file tmp name, file size, file type — only the name is in the array.

also the script throws an error 6 – tmp folder not found

I have tried various folders and the permissions is set to read write.

the php.ini —

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = c:tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 20M

Any idea what the problem might be?

I have checked the php.ini and it seems all the options needed are available and unremarked

I have the mbstring before the efix in the PHP.ini file

been at this for 6 days and any help would be appreciated!!!

David

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@MrCoderJun 25.2007 — Are you running apache with full access e.g. as the machine admin?

I know Vista is picky about this.
Copy linkTweet thisAlerts:
@ppgpilotauthorJun 26.2007 — thanks for the reply.

I discovered the problem was in the PHP install.

I uninstalled PHP which I installed with the installer, and reinstalled manually. I also found that a line we missing in the PHP.ini file assiging the path to the ext file.

The reinstall and the missing line in the ini solved the problem!
×

Success!

Help @ppgpilot spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...