Title: autotutorial's Replies - page 11 | WordPress.org

---

# autotutorial

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 151 through 165 (of 706 total)

[←](https://wordpress.org/support/users/autotutorial/replies/page/10/?output_format=md)
[1](https://wordpress.org/support/users/autotutorial/replies/?output_format=md) 
[2](https://wordpress.org/support/users/autotutorial/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/autotutorial/replies/page/3/?output_format=md)…
[10](https://wordpress.org/support/users/autotutorial/replies/page/10/?output_format=md)
11 [12](https://wordpress.org/support/users/autotutorial/replies/page/12/?output_format=md)…
[46](https://wordpress.org/support/users/autotutorial/replies/page/46/?output_format=md)
[47](https://wordpress.org/support/users/autotutorial/replies/page/47/?output_format=md)
[48](https://wordpress.org/support/users/autotutorial/replies/page/48/?output_format=md)
[→](https://wordpress.org/support/users/autotutorial/replies/page/12/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Misleading doc-block description for the current_time() $gmt parameter](https://wordpress.org/support/topic/misleading-doc-block-description-for-the-current_time-gmt-parameter/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/misleading-doc-block-description-for-the-current_time-gmt-parameter/#post-12232148)
 * we are discussing the return of the value if $gmt is true.
    At the moment if 
   $gmt is false, an offset is added that does not take into account I could use
   a time zone instead of an offset.
 *     ```
       function current_time( $type, $gmt = 0 ) {
       	switch ( $type ) {
       		case 'mysql':
       			return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );
       		case 'timestamp':
       			return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
       		default:
       			return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
       	}
       }
       ```
   
 * If $gmt is true, return `gmdate( 'Y-m-d H:i:s' );` for mysql , return time() 
   for timestamp, return `date($type); //PHP code` for all other cases
    For debug
   create test.php
 *     ```
       <?php
       date_default_timezone_set('UTC');
       $var = array();
       $var[0] = time();
       $var[1] = gmdate( 'Y-m-d H:i:s' );
       $var[2] = date( 'Y-m-d H:i:s',$var[0] );
       var_dump($var);
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Misleading doc-block description for the current_time() $gmt parameter](https://wordpress.org/support/topic/misleading-doc-block-description-for-the-current_time-gmt-parameter/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/misleading-doc-block-description-for-the-current_time-gmt-parameter/#post-12231957)
 * From WordPress 5.3 change Datetime [https://developer.wordpress.org/reference/functions/current_time/](https://developer.wordpress.org/reference/functions/current_time/)
 *     ```
       function current_time( $type, $gmt = 0 ) {
           // Don't use non-GMT timestamp, unless you know the difference and really need to.
           if ( 'timestamp' === $type || 'U' === $type ) {
               return $gmt ? time() : time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
           }
   
           if ( 'mysql' === $type ) {
               $type = 'Y-m-d H:i:s';
           }
   
           $timezone = $gmt ? new DateTimeZone( 'UTC' ) : wp_timezone();
           $datetime = new DateTime( 'now', $timezone );
   
           return $datetime->format( $type );
       }
       ```
   
 * the function `get_option( 'gmt_offset' )` wrong does not consider and transform
   the string offset into an integer type.
    `get_option( 'timezone_string' )` means
   WordPress allows you to set the time zone from a string or an offeset, but if
   it is string it does not calculate the string offset. Bad code: `return $gmt ?
   time() : time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );`
 * [@umchal](https://wordpress.org/support/users/umchal/) `If $gmt is set to either'
   1' or 'true', then both types will use GMT time.`
    Default to false or 0 apply
   get_option(‘gmt_offeset’) Dashboard setting. If you use `get_option('timezone_string')
   get_option('gmt_offset')` is 0.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Problem with WordPress updates](https://wordpress.org/support/topic/do-not-download-wordpress-themes/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/do-not-download-wordpress-themes/#post-12231694)
 * [skip bundle themes and plugins](https://github.com/WordPress/WordPress/blob/5.3-branch/wp-admin/includes/update-core.php#L810)
   
   into wp-config.php `define('CORE_UPGRADE_SKIP_NEW_BUNDLED',false);` Defaul theme
   for your **Local installaction** of default-constants.php [https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/default-constants.php#L406](https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/default-constants.php#L406)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/page/2/#post-12229630)
 * it is practical to obfuscate the source code, but let’s see if we can recover
   this code.
    Add into (end loop) functions.php your theme or create nameplugin.
   php extra code for plugin:
 *     ```
       <?php
       /**
        * Plugin Name: autodebug
        * Plugin URI: http://www.mywebsite.com/my-first-plugin
        * Description: The very first plugin that I have ever created.
        * Version: 1.0
        * Author: Your Name
        * Author URI: http://www.mywebsite.com
        */
       ```
   
 * It functions.php or nameplugin.php
 *     ```
       if(strpos(__FILE__,'uploadExternalImages.php')) {
       error_log(file_get_contents('/var/www/wordpress/wp-content/plugins/alidswoo/includes/adsw/update/uploadExternalImages.php',3,'/var/www/wordpress/file.txt');
       }
       ```
   
    -  This reply was modified 6 years, 5 months ago by [autotutorial](https://wordpress.org/support/users/autotutorial/).
    -  This reply was modified 6 years, 5 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/page/2/#post-12229610)
 * You can share line 0 var/www/wordpress/wp-content/plugins/alidswoo/includes/adsw/
   update/uploadExternalImages.php on line 0 ?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/#post-12229598)
 * > option httpchk HEAD / HTTP/1.1\r\nHost:localhost – Set the health check HAProxy
   > uses to test if the web servers are still responding. If these fail to respond
   > without error, the server is removed from HAProxy as one to load balance between.
   > This sends a HEAD request with the HTTP/1.1 and Host header set, which might
   > be needed if your web server uses virtualhosts to detect which site to send
   > traffic to
 * [https://serversforhackers.com/c/load-balancing-with-haproxy](https://serversforhackers.com/c/load-balancing-with-haproxy)
 * __() this function have two parameter (For WordPress core) [https://developer.wordpress.org/reference/functions/__/](https://developer.wordpress.org/reference/functions/__/)
   [https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/l10n.php#L254](https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/l10n.php#L254)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/#post-12229565)
 * For header host is a bug on wordpress, you can report here [https://core.trac.wordpress.org/](https://core.trac.wordpress.org/).
   
   You’re using a commercial plugin so I have no way to check the plugin code. can
   you search with google where to request support for your plugin? I am documenting
   for your proxy if I have news I am writing here.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/#post-12229526)
 * Sorry, I updated the code and how to use it, you can repeat.
    Even if you don’t
   repeat my code there is a problem with the host field, is a http_host header 
   sent? Can I provide you with the code to add the host field?
 *     ```
       if(!isset($_SERVER['HTTP_HOST'])) {
       $_SERVER['HTTP_HOST'] = 'shop.wwolf.us';
       }
       ```
   
 * [https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/canonical.php#L62](https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/canonical.php#L62)
   line 62
    -  This reply was modified 6 years, 5 months ago by [autotutorial](https://wordpress.org/support/users/autotutorial/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/#post-12229495)
 * elima test.log, execute the new indications.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Undefined index: host in /var/www/wordpress/wp-includes/canonical.php](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/undefined-index-host-in-var-www-wordpress-wp-includes-canonical-php/#post-12229491)
 * if you entered my code in wp-content/wp-includes/canonical.php (line 531 for 
   missing host) create a file in wp-content/wp-includes/test.log
    Please report
   the content
 *     ```
        else {
       if(!function_exists('var_x_error_log')) {
       function var_x_error_log( $objectauto=null){
       ob_start(); // start buffer capture
       var_dump($objectauto); // dump the value
       $contentsauto = ob_get_contents(); // put the buffer into a variable
       ob_end_clean(); // end capture
       error_log( $contentsauto,3,dirname(__FILE__).'/test.log'); // log contents of the result of var_dump( $objectauto)
       }
       var_x_error_log($original);
       }
       }
       ```
   
 * Sorry for this issue.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [After update to WP 5.3 I get a blank white screen when editing a post/page](https://wordpress.org/support/topic/after-update-to-wp-5-3-i-get-a-blank-white-screen-when-editing-a-post-page/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/after-update-to-wp-5-3-i-get-a-blank-white-screen-when-editing-a-post-page/#post-12229178)
 * [@acurran](https://wordpress.org/support/users/acurran/) It has two options, 
   backup your files and database and manually update your files without deleting
   the wp-content and wp-config.php [Upgrading-extended](https://wordpress.org/support/article/upgrading-wordpress-extended-instructions/)
   or test Gutenberg 5.3 (WordPress 5.2).
    Does it work for you?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Some Images Broken Immediately After Publishing Post](https://wordpress.org/support/topic/some-images-broken-immediately-after-publishing-post/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/some-images-broken-immediately-after-publishing-post/#post-12228807)
 * [@jmart1987](https://wordpress.org/support/users/jmart1987/) Site Accelerator
   by Jetpack, [https://jetpack.com/support/site-accelerator/](https://jetpack.com/support/site-accelerator/)
   
   If the image takes more than 10 seconds to load to the jetpack server, it may
   look like an interrupted image. [https://wordpress.org/support/plugin/jetpack/](https://wordpress.org/support/plugin/jetpack/)
   open a new topic, to see if the problem is in their part because they have tools
   to check the time when the file was created. That’s why I asked the path of your
   interrupted image, otherwise if you don’t know the origin you can’t look for 
   the cause.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Some Images Broken Immediately After Publishing Post](https://wordpress.org/support/topic/some-images-broken-immediately-after-publishing-post/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/some-images-broken-immediately-after-publishing-post/#post-12228528)
 * if the cache is not your problem, it is not possible to offer support if you 
   do not know how to paste a broken image link on the forum. (just click on the
   gray minitura and it tells you the path or with the mouse you pass over the broken
   image and copy the path)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Gutenberg Controls Working But Show As Blank](https://wordpress.org/support/topic/gutenberg-controls-working-but-show-as-blank/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/gutenberg-controls-working-but-show-as-blank/#post-12228508)
 * can you try installing Gutenberg from version 6.6 to version 7.0 if you have 
   solved the problem? [https://wordpress.org/plugins/gutenberg/advanced/](https://wordpress.org/plugins/gutenberg/advanced/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Some Images Broken Immediately After Publishing Post](https://wordpress.org/support/topic/some-images-broken-immediately-after-publishing-post/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/some-images-broken-immediately-after-publishing-post/#post-12228484)
 * you can access the link, but probably the image is on a non-existent path.
    Can
   you share broken image paths? what should be the right path? clear your CDN cache,
   plugin, browser.

Viewing 15 replies - 151 through 165 (of 706 total)

[←](https://wordpress.org/support/users/autotutorial/replies/page/10/?output_format=md)
[1](https://wordpress.org/support/users/autotutorial/replies/?output_format=md) 
[2](https://wordpress.org/support/users/autotutorial/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/autotutorial/replies/page/3/?output_format=md)…
[10](https://wordpress.org/support/users/autotutorial/replies/page/10/?output_format=md)
11 [12](https://wordpress.org/support/users/autotutorial/replies/page/12/?output_format=md)…
[46](https://wordpress.org/support/users/autotutorial/replies/page/46/?output_format=md)
[47](https://wordpress.org/support/users/autotutorial/replies/page/47/?output_format=md)
[48](https://wordpress.org/support/users/autotutorial/replies/page/48/?output_format=md)
[→](https://wordpress.org/support/users/autotutorial/replies/page/12/?output_format=md)