Recompiled nginx with upload progress module.
nginx -V shows that i have that module
Installed filefield nginx progress module for drupal 7
When i try to upload a file in to a File field, it hangs on "Starting upload..." then file successfully upload, so progress bar not working. On admin/reports/dblog i see the errors:
Notice: Undefined property: stdClass::$data in nginx_progress_fetch() (line 133 of /home/admin/web/default.domain/public_html/sites/all/modules/filefield_nginx_progress/filefield_nginx_progress.module).
I have added in nginx.conf:
server {
listen 10.0.2.15:80 default;
server_name _;
#access_log /var/log/nginx/10.0.2.15.log main;
location ~ (?<upload_form_uri>.*)/x-progress-id:(?<upload_id>\d*) {
rewrite ^ $upload_form_uri?X-Progress-ID=$upload_id;
}
location ^~ /progress {
upload_progress_json_output;
report_uploads uploads;
}
location / {
proxy_pass http://10.0.2.15:8080;
track_uploads uploads 60s;
}
}
and in http directive:
upload_progress uploads 1m;
What might be causing it? I am using nginx 1.4.4 as reverse proxy and Apache 2.2 as backend
Comment | File | Size | Author |
---|---|---|---|
#1 | howtoforge.com-displaying-upload-progress-nginx.jpg | 13.6 KB | cj-a-min |
Comments
Comment #1
cj-a-min CreditAttribution: cj-a-min commentedI have the same identical issue.
Drupal log says:
Undefined property: stdClass::$data in nginx_progress_fetch() (line 133 of /srv/www/drupal/sites/all/modules/filefield_nginx_progress/filefield_nginx_progress.module).
Upload form says:
An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (500 MB) that this server supports.
I followed this example (to test my sanity) and it uploads fine on the same server.
https://www.howtoforge.com/displaying-upload-progress-with-nginx-on-debian-wheezy
See attachment howtoforge.com-displaying-upload-progress-nginx.jpg
Besides being on Drupal, the only difference globally from howtoforge and drupal, is the version of jquery, tmp file location, and the nginx config, which is:
The nginx server config is:
The nginx http config is:
upload_progress uploads 1m;
File attempts were 340mb, 13mb, 3mb
return 200:
/file/ajax/field_zip_file/und/0/form-NRNPOJoSaXL8luC3XDcTjKSOsEdyNXlgtk9IbL-T4wM?X-Progress-ID=949107682
Video file attempts were 26mb, 12mb, 2mb
return 200:
/file/ajax/field_video/und/0/form-fqC15x1ZqT3g4u9KjvV0etnrAyNgzgwXIAuh4h8CQpU?X-Progress-ID=1176527994
Disabling the filefield_nginx_progress module, upload works. Which leads me to believe it's filefield_nginx_progress module bug. Updating the issue category to Bug Report and the status to Critical, as it's been a year and it hasn't been addressed.
System:
debian-8.1.0-amd64 (Jessie)
nginx-1.9.4
php-5.6.13
drupal-7.39
Nginx
client_max_body_size 500M;
php.ini
post_max_size = 500M
upload_max_filesize = 500M
memory_limit = 128M
Only Drupal Modules:
admin_menu
filefield_nginx_progress
libraries
module_filter
video
video_presets
videojs
.