File upload

Hi,

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.

Thanks

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?

@umamakesh

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

@miteshshah

Plugin name is formcraft

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

Thanks for looking into this

@umamakesh

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.

@miteshshah

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?

@umamakesh,

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

@gau1991

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.

http://arttsylabstest.arttsy.com/wp-content/plugins/formcraft/file-upload/server/content/upload.php

error.log (1.4 MB)

Appreciate your help!

@gau1991

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: