I have a client who's attempting to support a file upload script on several servers. All appear to have PHP configured with file_upload turned on, however *some* act as if it's not. This is an area I've not got a lot of experience in (yet) ... Any hints on what other configuration or environmental differences might cause file uploads not to work for a specific server/instance of PHP?

Many thanks,

Leo

Recommended Answers

All 6 Replies

The directory you're uploading to has to have the appropriate security attributes. The most important is the -w attribute. A directory that I use, in one app I created, has the following: drwxrwxr-x - it's used for uploading stuff to.

Thank you ... I've passed that along and we'll see if that's perhaps another part of our puzzle.

Leo

You also may want to check your MAX_FILE_UPLOAD size in your php.ini file.

depending on your host you might have to copy and paste the php.ini file into the folder where you upload script is being executed of course with the before mentioned

Yeh I had this problem, it's most likely as Arizona Web said with the MAX_FILE_UPLOAD in the php.ini since you said some files do upload.

I think by default it is configured to accept 2MB or less.

depending on your host you might have to copy and paste the php.ini file into the folder where you upload script is being executed of course with the before mentioned

I meant change the php.ini MAX_FILE_SIZE for uploads in the copy. You can do this in any folder, depending on your hosting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.