/    Sign up×
Community /Pin to ProfileBookmark

PHP Upload problem

Hi guys I have just coded a simpler CMS that allows users to upload jpegs, gifs and pngs to the file system on a remote server

I am using a modified version of the script at [URL=”http://www.w3schools.com/php/php_file_upload.asp”]here[/URL]

problem is that sometimes the file gets uploded and moved to the correct direcory and some times you end up wil an empty file i.e. pic.jpg with a file size of 0KB

I have tried in IE7 and Firefox and still have the same problem

The LAN that is used in the office is a bit unstable so this could be a factor

Any ideas?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@nshiellauthorJul 11.2007 — Bump!
Copy linkTweet thisAlerts:
@tcaJul 11.2007 — One likely problem is that the file you're trying to upload exceeds the upload_max_filesize.

If your server allows you to modify the ini file try: ini_set("upload_max_filesize","2M");

Change 2M (2 megabytes) to what ever size you need. 2M is default on many servers.

TC
×

Success!

Help @nshiell 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.3,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...