0

I am using a slightly modified version of phUploader script that works fine for small files. But when I try to upload files larger than 1MB it fails by giving this undescriptive error:

General upload failure.

Nginx error log does not show any evidence. I have set

upload_max_filesize = 200M
post_max_size = 200M
memory_limit = 128M

in the php.ini

and

client_max_body_size 200M;

in nginx.conf.

The odd thing is that the script used to work well on the same server (before an upgrade on Debian 6 server) and already works well on another Debian 6 server with the same nginx and php configs. So I'm really out of ideas and appreciate your hints.

1
  • having the similar issue, have u found the cause? Commented Oct 2, 2014 at 6:31

1 Answer 1

1

You're getting an undescriptive error because the script you're using isn't properly displaying the actual error (line 252).

Modify the script to echo or log the value of $_FILES['file']['error'] instead of "General upload failure." Then, you should see a more appropriate error code. The PHP Manual has a section that explains what the error codes mean.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.