/    Sign up×
Community /Pin to ProfileBookmark

UPLOAD_ERR_NO_FILE: Value: 4; No file was uploaded.

I’m having trouble uploading files from my administrative panel that was developed to allow an admin to add items to an online store. Any hints?

-Works fine when editing, but not when I try to add a new item.

[code]
[COLOR=Navy]Permission denied. Unable to copy file to ‘/mpmweb/images/store/inventory/'[/COLOR]
[/code]

[code]
$path = “/mpmweb/images/store/inventory/”;
$upload_file_name = “imgurl”;
$acceptable_file_types = “image/gif|image/jpeg|image/pjpeg”;
$default_extension = “”;
$mode = 2;

$my_uploader = new uploader(‘en’);
$my_uploader->max_filesize(200000);
$my_uploader->max_image_size(410, 410);

if ($my_uploader->upload($upload_file_name, $acceptable_file_types, $default_extension)) {
$my_uploader->save_file($path, $mode);
}

if ($my_uploader->error) {
$errmsg = $my_uploader->error;
}
else {
createThumbnail($path, $my_uploader->file[‘name’], $path);
[/code]

thanks

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@chazzyDec 07.2006 — my guess is that the user running apache doesn't have write access to the directory you're pointing to.
×

Success!

Help @00webman 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.20,
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,
)...