WordPress.org

Ready to get started?Download WordPress

Forums

WP-Filebase Download Manager
Download Counter Issue with Nginx (3 posts)

  1. Navahang
    Member
    Posted 1 year ago #

    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/

  2. Haris Nadeem
    Member
    Posted 1 year ago #

    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

  3. Fabian
    Member
    Plugin Author

    Posted 1 year ago #

    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);
    		}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.