File upload



I am trying to use a form plugin that lets people upload files to the server. The plugin is working flawlessly except the POST transaction of file upload fails with 500 network error. I am sure thats a permission error but i am not sure how to fix it.



This is what i have found based on the debug log

recv() not ready (11: Resource temporarily unavailable)

http body new buf t:1 f:0 00000000029175D0, pos 00000000029175D0, size: 8192 file: 0, size: 0

fastcgi param: “HTTP_CONTENT_LENGTH: 19765”

sendfile: 19765, @0 19765:19765

http upstream process header

http fastcgi header: “Status: 500 Internal Server Error”

@miteshshah @rahul286 is this a FastCGI error?



Can you share your plugin name and url so we can test it.



Plugin name is formcraft

For testing purposes I changed the permissions to all folders to 777 but no avail.

Thanks for looking into this



Its a paid plugins so we can’t test :frowning:

If your plugin use some custom .htaccess rules then we need to convert those rules to make it work with nginx.



I understand. I dont think its an access rule issue. When i use the same form with the file upload functionality, it works.

So the upload.php file works fine without a file upload. However, when you use file upload it tries to upload to /var/lib/nginx/body/0000000 but i dont see any file there. It is able to execute the php function but i see that fastcgi is throwing 500 error.


@rahul286 @miteshshah

Any pointers for troubleshooting please?



As your plugin is paid, we can not test it. Its better if you give us Nginx and PHP error logs so that we can see what is actul error



Attached is the error log from the request. tried uploading a file and it failed.

This is the link that is throwing the 500 internal server error.

error.log (1.4 MB)

Appreciate your help!



As i went through the error log, i found this error I found this error to be confounding!

PHP Fatal error: Call to undefined function plugins_url()

plugins_url() is a wordpress function which works on all other plugins but for the upload.php during frontend upload.


Hi @umamakesh

It’s been a long time, and we haven’t heard from you. It looks like your issue is resolved.

I am closing this support topic for now. Feel free to create a new support topic if you have any queries further. :slight_smile: