Title: fhoech's Replies | WordPress.org

---

# fhoech

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple History – Track, Log, and Audit WordPress Changes] bbPress support?](https://wordpress.org/support/topic/bbpress-support-41/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bbpress-support-41/#post-17000009)
 * Thanks for looking into it. If I find the time, I might take a stab at this and
   see how far I get.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] Please don’t rely on DOCUMENT_ROOT](https://wordpress.org/support/topic/please-dont-rely-on-document_root/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/please-dont-rely-on-document_root/#post-11012238)
 * Another one from WikiMedia foundation: [https://github.com/wikimedia/RelPath/blob/master/src/Wikimedia/RelPath.php](https://github.com/wikimedia/RelPath/blob/master/src/Wikimedia/RelPath.php)
 * This one may be better tested than the others?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] Please don’t rely on DOCUMENT_ROOT](https://wordpress.org/support/topic/please-dont-rely-on-document_root/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/please-dont-rely-on-document_root/#post-11012227)
 * Hmm. ABSPATH should work in most cases, unless wp_content is below that in the
   filesystem – in that case, you’d have to figure out the relative path using something
   like [this](https://stackoverflow.com/questions/2637945/getting-relative-path-from-absolute-path-in-php)
   or [this](https://github.com/cujojs/canhaz/blob/master/bin/relpath.php) (not 
   tested any of them).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] High number of minified files appearing](https://wordpress.org/support/topic/high-number-of-minified-files-appearing/)
 *  [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/high-number-of-minified-files-appearing/#post-8856971)
 * I also noticed less files being concatenated, without style order or number having
   changed on my site, and took a look as to why. MMR makes sure that styles with
   different media types don’t get concatenated into one (which is good because 
   that could break the look of the site otherwise), but it doesn’t fall back to
   the default of ‘all’ for enqueued styles where no media type was given. This 
   is easily fixed by some slight re-ordering of the code that does check the media
   type (diff against MMR 1.7.2):
 *     ```
       --- merge-minify-refresh.php	Tue Feb 28 03:16:28 2017
       +++ merge-minify-refresh.php	Tue Feb 28 13:59:55 2017
       @@ -682,8 +682,8 @@
   
        				if( $this->host_match($wp_styles->registered[$handle]->src) && !in_array($wp_styles->registered[$handle]->src, $this->ignore) && !isset($wp_styles->registered[$handle]->extra["conditional"])) { //is a local script
   
       -					if(!$this->mergecss || isset($footer[count($footer)-1]['handle']) || count($footer) == 0 || $footer[count($footer)-1]['media'] != $wp_styles->registered[$handle]->args ) {
       -						$media = isset($wp_styles->registered[$handle]->args) ? $wp_styles->registered[$handle]->args : 'all';
       +					$media = isset($wp_styles->registered[$handle]->args) ? $wp_styles->registered[$handle]->args : 'all';
       +					if(!$this->mergecss || isset($footer[count($footer)-1]['handle']) || count($footer) == 0 || $footer[count($footer)-1]['media'] != $media ) {
   
        						array_push($footer, array('modified'=>0,'handles'=>array(),'media'=>$media ));
        					}
       @@ -830,8 +830,8 @@
   
        				if( $this->host_match($wp_styles->registered[$handle]->src) && !in_array($wp_styles->registered[$handle]->src, $this->ignore) && !isset($wp_styles->registered[$handle]->extra["conditional"])) { //is a local script
   
       -					if(!$this->mergecss || isset($header[count($header)-1]['handle']) || count($header) == 0 || $header[count($header)-1]['media'] != $wp_styles->registered[$handle]->args ) {
       -						$media = isset($wp_styles->registered[$handle]->args) ? $wp_styles->registered[$handle]->args : 'all';
       +					$media = isset($wp_styles->registered[$handle]->args) ? $wp_styles->registered[$handle]->args : 'all';
       +					if(!$this->mergecss || isset($header[count($header)-1]['handle']) || count($header) == 0 || $header[count($header)-1]['media'] != $media ) {
        						array_push($header, array('modified'=>0,'handles'=>array(),'media'=>$media ));
        					}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Cloudflare] ERROR: The email address isn’t correct.](https://wordpress.org/support/topic/error-the-email-address-isnt-correct-2/)
 *  [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/error-the-email-address-isnt-correct-2/#post-7217790)
 * It’s because of input sanitation (relevant change: [https://plugins.trac.wordpress.org/changeset/1380646/cloudflare](https://plugins.trac.wordpress.org/changeset/1380646/cloudflare)).
 * The sanitation turns an email address (e.g. coming in via $_POST[’email’]) like‘
   test@test.com’ into ‘test&commat;test&period;com ‘.
 * I think the current sanitation code needs to be reviewed or removed altogether
   as it is too broad and makes unexpected changes to input data.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] Generates blank/empty files; file_get_contents errors](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/)
 *  [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/page/2/#post-7180816)
 * Alright, this does indeed seem to work. No errors so far on my test site. Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] Generates blank/empty files; file_get_contents errors](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/)
 *  [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/page/2/#post-7180814)
 * > Thats really odd that ABSPATH is stripping the start of the path.
 * That’s not what’s happening though.
 * ABSPATH is simply defined as `dirname(__FILE__)` in wp-config.php (WordPress 
   default).
 * I’m still unclear of the purpose to figuring out the WordPress install path relative
   to DOCUMENT_ROOT which seems to be what MMR is doing, but I’m probably missing
   something obvious.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] Generates blank/empty files; file_get_contents errors](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/)
 *  [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/#post-7180812)
 * Doesn’t work for me unfortunately because of ABSPATH not starting with DOCUMENT_ROOT(
   Edit: plugin version from DropBox).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Merge + Minify + Refresh] Generates blank/empty files; file_get_contents errors](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/)
 *  [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/generates-blankempty-files-file_get_contents-errors-1/#post-7180803)
 * Similar problem here:
 * `Warning: file_get_contents(/kunden/homepages/x/y/htdocs/hoech/wp-testing/homepages/
   x/y/htdocs/hoech/wp-testing/wp-content/plugins/buddypress/bp-core/js/jquery-query.
   min.js): failed to open stream: No such file or directory in /homepages/x/y/htdocs/
   hoech/wp-testing/wp-content/plugins/merge-minify-refresh/merge-minify-refresh.
   php on line 407`
 * `/kunden/homepages/x/y/htdocs/` is the DOCUMENT_ROOT.
    `/homepages/x/y/htdocs/
   hoech/wp-testing/` is the WordPress directory (ABSPATH). As you can see, the 
   WordPress directory is repeated above in the path the plugin tries to access.
 * The underlying problem seems to be the line `untrailingslashit(str_replace($_SERVER["
   DOCUMENT_ROOT"], '', ABSPATH));` in merge-minify-refresh.php (version 1.6.5).
   It seems that ABSPATH starting with DOCUMENT_ROOT is **not** guaranteed. I can’t
   influence this either because it’s shared hosting.
    I’m not sure what the line
   is for either, i.e. it’s trying to figure out where WordPress is installed relative
   to DOCUMENT_ROOT, but the purpose of this is unclear to me.
 * I downgraded to 1.6.3 as a work-around.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Specific URL text inserted into post or page breaks fresh WordPress site](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/#post-7104958)
 * Reported as [#35979](https://core.trac.wordpress.org/ticket/35979).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Specific URL text inserted into post or page breaks fresh WordPress site](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/#post-7104871)
 * Ok, WordPress not only parses the URL, it also seems to try and fetch the resource
   located at the URL. I am a little bit speechless. Fetching a random remote resource
   seems like a big security risk to me, and in my case it actually opens the possibility
   of a remote DoS attack by simply making the resource so big that WP runs out 
   of memory.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Specific URL text inserted into post or page breaks fresh WordPress site](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/#post-7104868)
 * A way to work-around the problem is to install the “Disable Embeds” plug-in: 
   [https://wordpress.org/plugins/disable-embeds/](https://wordpress.org/plugins/disable-embeds/)
 * Still, the memory usage for parsing a simple URL seems excessive. Should I report
   this as a bug?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Specific URL text inserted into post or page breaks fresh WordPress site](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/#post-7104867)
 * Alright, I finally made some progress. It’s a problem with oembed, i.e. it seems
   it parses the URL and runs out of memory in doing so. Thankfully, my hoster allows
   SSH access, so I set the test page as my WordPress start page and then ran `php5.5-
   cli index.php` in my WordPress install directory and got the following error:
 * `Fatal error: Allowed memory size of 125829120 bytes exhausted (tried to allocate
   63846401 bytes) in wp-includes/class-oembed.php on line 345`
 * I’m currently looking into what exactly oembed is doing when it encounters this
   specific URL to figure out why it would need so much memory.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Specific URL text inserted into post or page breaks fresh WordPress site](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/#post-7104823)
 * Ok, thanks. It’s plain text pasted into the editor when creating a new page, 
   no HTML, and no PHP coding involved.
 * > but I think it’s the link itself that is causing your site to break.
 * Yes, exactly (it’s technically not even a link, just text that can be interpreted
   as an URL).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Specific URL text inserted into post or page breaks fresh WordPress site](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/)
 *  Thread Starter [fhoech](https://wordpress.org/support/users/fhoech/)
 * (@fhoech)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/specific-url-text-inserted-into-post-or-page-breaks-fresh-wordpress-site/#post-7104821)
 * > It isn’t actually breaking the whole site, but not displaying, which is interesting
   > though. I might test this.
 * You do not seem to understand. It’s not their site that is breaking, it is mine,
   as described in detail in the first post.
    Have you looked at [http://wp.hoech.net/test](http://wp.hoech.net/test)?
   This page should contain the post text (no HTML!) `http://www.homecinema-fr.com/
   colorimetre/release/DVD_V2.0.0.ISO` but if you look at the page source you can
   see that it doesn’t even get as far as displaying the post contents (the last
   bit of HTML is the opening <div class=”entry-content”>, the document simply ends
   after that).
 * Edit: Addad backticks around URL text so it hopefully doesn’t get displayed as
   HTML link.

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

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