Support » Plugin: WP-Filebase Download Manager » Download Counter Issue with Nginx

  • Hi,

    Thank you for your great plugin!

    My website is on a server with Nginx!
    Before installing Nginx on server, I could see it counts each and every download but due to high number of traffic we had to install nginx on server and after that plugin stopped counting downloads.

    Is there any additional Nginx configuration for this plugin to make it compatible with Nginx?

    Kind regards,

    http://wordpress.org/extend/plugins/wp-filebase/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the same concern and would like to know if the download counter works fine on WordPress 3.5 with nginx web server?

    Thanks

    Plugin Author Fabian

    (@fabifott)

    Try the following:
    In classes/File.php comment-out line 520:

    // count download
    		if(!$is_admin || !WPFB_Core::GetOpt('ignore_admin_dls')) {
    			$last_dl_time = mysql2date('U', $this->file_last_dl_time , false);
    //			if(empty($this->file_last_dl_ip) || $this->file_last_dl_ip != $downloader_ip || ((time() - $last_dl_time) > 86400))
    				$wpdb->query("UPDATE " . $wpdb->wpfilebase_files . " SET file_hits = file_hits + 1, file_last_dl_ip = '" . $downloader_ip . "', file_last_dl_time = '" . current_time('mysql') . "' WHERE file_id = " . (int)$this->file_id);
    		}

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Download Counter Issue with Nginx’ is closed to new replies.