Title: egycode's Replies | WordPress.org

---

# egycode

  [  ](https://wordpress.org/support/users/egycode/)

 *   [Profile](https://wordpress.org/support/users/egycode/)
 *   [Topics Started](https://wordpress.org/support/users/egycode/topics/)
 *   [Replies Created](https://wordpress.org/support/users/egycode/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/egycode/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/egycode/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/egycode/engagements/)
 *   [Favorites](https://wordpress.org/support/users/egycode/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/users/egycode/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/egycode/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Koko Analytics - Privacy-Friendly WordPress Analytics] Working solution to count taxonomies and categories pages visits](https://wordpress.org/support/topic/count-taxonomies-and-categories-pages-visits/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [3 years ago](https://wordpress.org/support/topic/count-taxonomies-and-categories-pages-visits/#post-16719786)
 * You’re welcome 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Php 7.4 and WP supercache](https://wordpress.org/support/topic/php-7-4-and-wp-supercache/)
 *  [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-7-4-and-wp-supercache/#post-12326849)
 * Its easy to fix these errors one by one untill you fix them all, just search 
   for every error message on Google and you will be able to edit the code, unfortunately
   I don’t have time for upgrading to php 7.4 and fixing all other plugins errors!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Passed as directory privacy on wp-admin and wp-includes folders](https://wordpress.org/support/topic/passed-as-directory-privacy-on-wp-admin-and-wp-includes-folders/)
 *  [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/passed-as-directory-privacy-on-wp-admin-and-wp-includes-folders/#post-12324616)
 * Your website pages contain urls or links that request wp-admin/ directory like/
   wp-admin/admin-ajax.php
    You have to exclude this file from your firewall settings!
 * Have a nice day!
 * BTW, what plugin you use for your website that looks like Google play?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Wondering if still in production?](https://wordpress.org/support/topic/wondering-if-still-in-production/)
 *  [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wondering-if-still-in-production/#post-12324555)
 * What error do you get?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Php 7.4 and WP supercache](https://wordpress.org/support/topic/php-7-4-and-wp-supercache/)
 *  [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-7-4-and-wp-supercache/#post-12324551)
 * Why don’t you rollback to php 7.3? I had this issue and fixed this by switching
   back to php 7.3!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] WP Super Cache and WP 5.3.1 compatibility?](https://wordpress.org/support/topic/wp-super-cache-and-wp-5-3-1-compatibility/)
 *  [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wp-super-cache-and-wp-5-3-1-compatibility/#post-12324541)
 * Why, what error do you get?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Strange domain in supercache folder!!](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/#post-10800198)
 * Seems that this is the only solution for such issue, this domain is pointing 
   to my server ip!! I don’t know why! maybe he was trying to use my smtp server
   to send spam emails as I noticed some failed logins yesterday! so I allowed only
   local host to access the MTA mail server and blocked him!
 * For any one have similar issue with wp super cache plugin, don’t panic this is
   not a big breach issue as i first though 🙂
 * Here is another resource for what this issue about.
 * [https://serverfault.com/questions/372662/how-to-make-nginx-only-respond-to-one-domain](https://serverfault.com/questions/372662/how-to-make-nginx-only-respond-to-one-domain)
    -  This reply was modified 7 years, 7 months ago by [egycode](https://wordpress.org/support/users/egycode/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Strange domain in supercache folder!!](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/#post-10800162)
 * Edit: still not fully solved! the domain still can access my website when accessing
   [https://www.otherdomain.com](https://www.otherdomain.com) but he get not found
   error on my server!
 * How could I disable such behavior? I only want domains on my nginx server to 
   access the server!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Strange domain in supercache folder!!](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/#post-10800148)
 * Fixed it!
 * Adding this at the very top part to your domain config file under /etc/nginx/
   conf.d
 * >  server {
   >  listen 80 default_server; server_name _; return 404; }
   > server {
   >  listen 443 ssl default_server; server_name _; resolver 127.0.0.1 [::
   > 1]:5353 valid=30s; ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate
   > <path to trusted cert>;
   >  ssl_certificate <path to cert>;
   >  ssl_certificate_key <path to key>; include
   > path to <ssl.conf>; ssl_dhparam path to <ssl-dhparams.pem>; return 404; }
    -  This reply was modified 7 years, 7 months ago by [egycode](https://wordpress.org/support/users/egycode/).
    -  This reply was modified 7 years, 7 months ago by [egycode](https://wordpress.org/support/users/egycode/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] Strange domain in supercache folder!!](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/strange-domain-in-supercache-folder/#post-10800115)
 * I searched google for the issue and I came across this!
 * [https://stackoverflow.com/questions/12724705/strange-domains-in-mod-pagespeed-cache-folder](https://stackoverflow.com/questions/12724705/strange-domains-in-mod-pagespeed-cache-folder)
 * I disabled nginx mod page speed from 3 weeks now! How to clean my server from
   this! and how to disable HTTP requests with invalid Host headers?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] issue updating mysql database with page load with wp super cache enabled](https://wordpress.org/support/topic/issue-updating-mysql-database-with-page-load-with-wp-super-cache-enabled/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/issue-updating-mysql-database-with-page-load-with-wp-super-cache-enabled/#post-10800099)
 * Thank you, issue has been fixed, there was issue regarding order of java script
   output!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] issue updating mysql database with page load with wp super cache enabled](https://wordpress.org/support/topic/issue-updating-mysql-database-with-page-load-with-wp-super-cache-enabled/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/issue-updating-mysql-database-with-page-load-with-wp-super-cache-enabled/#post-10765562)
 * Thank you [@stodorovic](https://wordpress.org/support/users/stodorovic/)!
 * There is already js method that update page views implemented within the theme
   but i noticed it stopped working after I installed wp super cache and this is
   the included code:
 * In the theme functions.php file:
 * require trailingslashit( get_template_directory() ) . ‘inc/hybrid/entry-views.
   php’;
 * And in entry-views.php file:
 * /* Add post type support for ‘entry-views’. */
    add_action( ‘init’, ‘entry_views_post_type_support’);
 * /* Registers the entry views extension scripts if we’re on the correct page. */
   
   add_action( ‘template_redirect’, ‘entry_views_load’ );
 * /* Add the entry views AJAX actions to the appropriate hooks. */
    add_action(‘
   wp_ajax_entry_views’, ‘entry_views_update_ajax’ ); add_action( ‘wp_ajax_nopriv_entry_views’,‘
   entry_views_update_ajax’ );`
 * /**
    * Adds support for ‘entry-views’ to the ‘post’, ‘page’, and ‘attachment’
   post types (default WordPress * post types). For all other post types, the theme
   should explicitly register support for this feature. * * [@since](https://wordpress.org/support/users/since/)
   0.2.0 * [@access](https://wordpress.org/support/users/access/) private * [@return](https://wordpress.org/support/users/return/)
   void */ function entry_views_post_type_support() {
 *  /* Add support for entry-views to the ‘post’ post type. */
    add_post_type_support(‘
   post’, array( ‘entry-views’ ) );
 *  /* Add support for entry-views to the ‘page’ post type. */
    add_post_type_support(‘
   page’, array( ‘entry-views’ ) );
 *  /* Add support for entry-views to the ‘attachment’ post type. */
    add_post_type_support(‘
   attachment’, array( ‘entry-views’ ) ); }
 * /**
    * Checks if we’re on a singular post view and if the current post type supports
   the ‘entry-views’ * extension. If so, set the $post_id variable and load the 
   needed JavaScript. * * [@since](https://wordpress.org/support/users/since/) 0.1.0*
   [@access](https://wordpress.org/support/users/access/) private * [@return](https://wordpress.org/support/users/return/)
   void */ function entry_views_load() { global $_entry_views_post_id;
 *  /* Get the post object. */
    $post = get_queried_object();
 *  //My Code start
    /* Check if we’re on a singular post view. */ if ( is_singular()&&!
   is_preview() && is_object($post) ) {
 *  /* Check if the post type supports the ‘entry-views’ feature. */
    if ( post_type_supports(
   $post->post_type, ‘entry-views’ ) ) {
 *  /* Set the post ID for later use because we wouldn’t want a custom query to 
   change this. */
    $_entry_views_post_id = get_queried_object_id();
 *  /* Enqueue the jQuery library. */
    wp_enqueue_script( ‘jquery’ );
 *  /* Load the entry views JavaScript in the footer. */
    add_action( ‘wp_footer’,‘
   entry_views_load_scripts’ ); } } }
 * /**
    * Updates the number of views when on a singular view of a post. This function
   uses post meta to store * the number of views per post. By default, the meta 
   key is ‘Views’, but you can filter this with the * ‘entry_views_meta_key’ hook.**
   [@since](https://wordpress.org/support/users/since/) 0.1.0 * [@access](https://wordpress.org/support/users/access/)
   public * [@param](https://wordpress.org/support/users/param/) int $post_id The
   ID of the post to update the meta for. * [@return](https://wordpress.org/support/users/return/)
   void */ function entry_views_update( $post_id = ” ) {
 *  /* If we’re on a singular view of a post, calculate the number of views. */
   
   if ( !empty( $post_id ) ) {
 *  /* Allow devs to override the meta key used. By default, this is ‘Views’. */
   
   $meta_key = apply_filters( ‘entry_views_meta_key’, ‘Views’ );
 *  /* Get the number of views the post currently has. */
    $old_views = get_post_meta(
   $post_id, $meta_key, true );
 *  /* Add +1 to the number of current views. */
    $new_views = absint( $old_views)
   + 1;
 *  /* Update the view count with the new view count. */
    update_post_meta( $post_id,
   $meta_key, $new_views, $old_views ); } }
 * /**
    * Gets the number of views a specific post has. It also doubles as a shortcode,
   which is called with the * [entry-views] format. * * [@since](https://wordpress.org/support/users/since/)
   0.1.0 * [@access](https://wordpress.org/support/users/access/) public * [@param](https://wordpress.org/support/users/param/)
   array $attr Attributes for use in the shortcode. * [@return](https://wordpress.org/support/users/return/)
   string */ function entry_views_get( $attr = ” ) {
 *  /* Merge the defaults and the given attributes. */
    $attr = shortcode_atts( 
   array( ‘before’ => ”, ‘after’ => ”, ‘post_id’ => get_the_ID() ), $attr );
 *  /* Allow devs to override the meta key used. */
    $meta_key = apply_filters( ‘
   entry_views_meta_key’, ‘Views’ );
 *  /* Get the number of views the post has. */
    $views = intval( get_post_meta(
   $attr[‘post_id’], $meta_key, true ) );
 *  /* Returns the formatted number of views. */
    return $attr[‘before’] . number_format_i18n(
   $views ) . $attr[‘after’]; }
 * /**
    * Callback function hooked to ‘wp_ajax_entry_views’ and ‘wp_ajax_nopriv_entry_views’.
   It checks the * AJAX nonce and passes the given $post_id to the entry views update
   function. * * [@since](https://wordpress.org/support/users/since/) 0.1.0 * [@access](https://wordpress.org/support/users/access/)
   private * [@return](https://wordpress.org/support/users/return/) void */ function
   entry_views_update_ajax() {
 *  /* Check the AJAX nonce to make sure this is a valid request. */
    check_ajax_referer(‘
   entry_views_ajax’ );
 *  /* If the post ID is set, set it to the $post_id variable and make sure it’s
   an integer. */
    if ( isset( $_POST[‘post_id’] ) ) $post_id = absint( $_POST[‘
   post_id’] );
 *  /* If $post_id isn’t empty, pass it to the entry_views_update() function to 
   update the view count. */
    if ( !empty( $post_id ) ) entry_views_update( $post_id);}
 * /**
    * Displays a small script that sends an AJAX request for the page. It passes
   the $post_id to the AJAX * callback function for updating the meta. * * [@since](https://wordpress.org/support/users/since/)
   0.1.0 * [@access](https://wordpress.org/support/users/access/) private * [@return](https://wordpress.org/support/users/return/)
   void */ function entry_views_load_scripts() { global $_entry_views_post_id;
 *  /* Create a nonce for the AJAX request. */
    $nonce = wp_create_nonce( ‘entry_views_ajax’);
 *  /* Display the JavaScript needed. */
    echo ‘<script type=”text/javascript”>/*
   <![CDATA[ */ jQuery(document).ready( function() { jQuery.post( “‘ . admin_url(‘
   admin-ajax.php’ ) . ‘”, { action : “entry_views”, _ajax_nonce : “‘ . $nonce .‘”,
   post_id : ‘ . $_entry_views_post_id . ‘ } ); } ); /* ]]> */</script>’ . “\n”;}`
 * How to edit this code to get it worked, I don’t prefer to install a plugin jsut
   to use an action it triggers, I want to get it working using ajax.
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[UpdraftPlus: WP Backup & Migration Plugin] fclose() and unlink() errors](https://wordpress.org/support/topic/fclose-and-unlink-errors/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/fclose-and-unlink-errors/#post-10686303)
 * Sorry, I didn’t look at the date, I thought this was fixed in the last release
   as I didn’t see this thread long time ago..
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[UpdraftPlus: WP Backup & Migration Plugin] fclose() and unlink() errors](https://wordpress.org/support/topic/fclose-and-unlink-errors/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/fclose-and-unlink-errors/#post-10675341)
 * > There is indeed a gremlin there. It’s only affect is to cause a misleading 
   > log line in limited circumstances. Fixed now for our next release. Thanks for
   > the report!
 * Sorry for the late reply, I was busy.. the error related to the index occurred
   again
 * [08-Sep-2018 02:10:06 UTC] PHP Notice: Undefined index: others in /wp-content/
   plugins/updraftplus/backup.php on line 664
 * Thanks.
    -  This reply was modified 7 years, 8 months ago by [egycode](https://wordpress.org/support/users/egycode/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[UpdraftPlus: WP Backup & Migration Plugin] fclose() and unlink() errors](https://wordpress.org/support/topic/fclose-and-unlink-errors/)
 *  Thread Starter [egycode](https://wordpress.org/support/users/egycode/)
 * (@egycode)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/fclose-and-unlink-errors/#post-10634171)
 * Sorry, the log file has been deleted and this error didn’t occur in the last 
   days! maybe it happen only if you try to create a specific backup like others
   folder after an automatic backup already created, the plugin will delete the 
   most recent same backup part (others folder) from the last full backup on remote
   storage! Is this implemented in your code?
 * Have a nice day!

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/users/egycode/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/egycode/replies/page/2/?output_format=md)